O'Reilly logo

Pragmatic Scala by Venkat Subramaniam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 3From Java to Scala

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required