Course Description

Scala Programming

This course provides an introduction to the Scala programming language. Scala is a multi-paradigm language, allowing developers to write in both functional and object-oriented styles. The language runs on the JVM, which means that Scala has access to a vast range of Java libraries, and can interoperate with Java code.

The course will introduce the main features Scala: its support for object-oriented programming, and its support for functional programming.

Supported Distributions

The course can be run on Windows, Linux or OS X.



4 Days


Target Audience

Developers who wish to learn object-oriented and functional programming in Scala.


Course Prerequisites

The Scala Programming course assumes a basic familiarity with the Java world, such as what the Java Virtual Machine (JVM) is for, how code is compiled and run, and the basics of Java development. This course begins with a one day overview which will give those unfamiliar with Java the knowledge they need in order to start using Scala.

Delegates are expected to have solid experience in developing in a high-level language, and a knowledge of the principles of OO programming will be helpful.


Suggested Follow on Courses

Advanced Scala Programming – GTSC02

Concurrent Programming in in Scala – GTSC03


Course Content

Day 1 – Overview of Java

  • A brief history of Java, the language and platform
  • Essential features of the Java world
  • The Java Virtual Machine
  • Compiling and running Java code
  • Class files and JAR files
  • Class loading
  • Development tools for JVM languages
  • Basic Eclipse use
  • Java fundamentals

Followed by Days 2 to 4:

Introduction to Scala Programming

  • Origins and overview of Scala
  • Scala and Java – which to use, when and why
  • Overview of Scala development tools (Eclipse, scalac, sbt, Maven, Gradle, REPL, ScalaTest)
  • Overview of Scala Frameworks

Scala Syntax Fundamentals

  • Data types
  • Variables
  • Operators
  • Functions and lambdas
  • Scala Statements / Loops / Expressions
  • Strings
  • Easy I/O in Scala

Object-Oriented Programming with Scala

  • Defining and using classes
  • Constructors
  • Companion objects
  • val and def
  • Exception Handling

Inheritance and Traits

  • Inheritance and the Object Hierarchy
  • AnyVal and AnyRef
  • Nothing and Null
  • Abstract classes and methods
  • Traits
  • Packages and package objects

Test-Driven Development with Scala

  • Unit testing and TDD
  • Writing good unit tests
  • Using ScalaTest
  • Using matchers

Functional Programming with Scala

  • What is functional programming?
  • Pure & First Class Functions
  • Anonymous Functions
  • Higher Order Functions
  • Currying, Closures & Partials
  • Tail Recursion
  • Lazy evaluation

Collections and Generics

  • Java and Scala Collections
  • Mutable and immutable collections
  • Generic types
  • Type bounds and variance
  • Arrays and Ranges
  • Lists, tuples and maps

Functional Programming and Collections

  • foreach and map
  • fold, reduce and filter
  • Flattening collections and flatMap
  • Option
  • The for comprehension

Pattern Matching

  • Using “Match”
  • Case Classes
  • Wildcards
  • Case Constructors & Deep Matching
  • Using Extractors


See more Programming Languages courses