O'Reilly logo

Introduction to the Art of Programming Using Scala by Mark C. Lewis

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

Appendix A

Quick Preview of Java

Scala has many of its roots in the Java programming language beyond compiling to the Java Virtual Machine (JVM) and having the ability to call on Java library functions. For this reason, it should not be too hard to pick up Java after you have learned Scala. This appendix is designed to help you in doing exactly that. To accomplish that goal, we will run through a number of different simple examples of Java code and look at the ways in which they are different from Scala code. Given that you are already familiar with Eclipse, this will be done using that platform. Simply switch to the Java perspective, which is the default for Eclipse, make a project, and try things out.1

A.1 Hello World

We will start with Java ...

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