This part of the book is about the key differences between Java and Scala language syntax. Given some typical Java code, we’ll look at equivalent Scala syntax. In Part III, we’ll look more at Scala features for which there is no direct equivalent in Java.
We’re going to look at the following:
Lots of things around classes and objects, creating classes, fields, and methods. We’ll do some round-tripping from Scala-generated bytecode back to Java, so that you can get a feel for how Scala relates to Java.
Inheritance, interfaces, abstract classes, and mixins.
Common control structures like for loops.
Scala is very flexible
. There are generally several ways to achieve the same thing. I don’t mean the difference ...