With Scala, you can build on your Java skills. Scala is similar to Java in several ways and yet different in so many others. Scala favors pure object orientation, but it maps types to Java types where possible. Scala supports the familiar imperative coding style and at the same time supports the functional style. Thanks to this facility, you can start coding right away with the style you’re familiar with without incurring a steep learning curve.
In this chapter, we’ll start on familiar ground—with Java code—and then move toward Scala. Crank up your favorite editor; we’re ready to write some Scala code.