📜  scala 与 java 代码示例

📅  最后修改于: 2022-03-11 14:52:35.249000             🧑  作者: Mango

代码示例1
Scala is a statically typed programming language whereas Java is a multi-platform, network-centric, programming language.
Scala uses an actor model for supporting modern concurrency whereas Java uses the conventional thread-based model for concurrency.
Scala variables are by default immutable type while Java variables are by default mutable type.
Scala supports lazy evaluation while Java doesn’t support lazy evaluation.
Scala doesn’t contain static members whereas Java contains static members.
Scala supports operator overloading whereas Java doesn’t support operator overloading.
Scala doesn’t offer backward compatibility whereas Java offers backward compatibility.
Scala is less readable because of nested code whereas Java is more readable.
Scala frameworks are Play, Lift whereas Java frameworks are Spring, Grails, and many more.