O'Reilly logo

Beginning Scala by David Pollak

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 2. Scala Syntax, Scripts, and Your First Scala Programs

We're going to get our hands dirty with Scala code in this chapter. We'll write some Scala code, starting with the ubiquitous "Hello World," and moving on to more complex Scala programs. This will give your eyes and brain an idea of what Scala code looks like. Next, we're going to take a long and boring tour of Scala's syntax. Finally, we're going to see some options for running (and compiling) Scala programs.

Scala at the Command Line and Scala Scripts

Scala offers different ways to run programs:

  • You can run them interactively at a REPL (read-eval-print loop) command line.

  • You can run single-file Scala scripts.

  • You can compile your Scala programs into class files that can be combined ...

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