This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Code Examples

Curious to see what a Scala program looks like? Here you will find the standard "Hello, world!" program, plus simple snippets of Scala code and more advanced code examples.

  • Hello, world!
    A first program in Scala: how to run it using the interpreter or the compiler.
     
  • Simple Examples
    A list of simple Scala snippets, useful to understand some basics of the language, as well as to see what Scala code looks like.
     
  • Advanced Examples
    More complex examples that show more advanced features of the Scala language.

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland