What is the difference between Java and Scala?
S.no | Scala | Java |
---|---|---|
1. | Includes implicit | Includes widening and casting |
2. | variables immutable | variables mutable by default |
3. | Pattern matching | Switch statements |
4. | Allows related type to be defined as one file | Does not allow related types to be described in one file |
BY Best Interview Question ON 04 Apr 2020