Scala 3
Scala 3.9 LTS on the JVM: values and types, case classes and enums, functional code, givens, concurrency, tooling, Java interop and Spark.
17 lessons: 17 free with Pro answers.
Examples run with scala 3.9.0 and Java 25.0.4.1.
Who it is for
Developers who already program in Java, Kotlin or Python and want Scala 3 for back-end services, and data engineers who write Spark jobs in Scala.
What you will be able to do
- Install Scala 3.9 and a JDK, run programs, scripts and the REPL, and read what the compiler reports
- Write expressions, methods and control flow with Scala's numbers, strings and type inference
- Model data with classes, traits, case classes, enums and opaque types, and take it apart with match
- Write functional code with higher-order functions, Option, Either and for-comprehensions
- Choose and transform immutable collections by what each operation costs
- Use generics, variance, union types, givens and type classes in everyday code
- Write concurrent code with Futures, direct style, effect systems and actors
- Build, test, package and publish projects with Scala CLI, sbt, MUnit and ScalaCheck
- Call Java from Scala and back, and upgrade code from Scala 2.13 and 3.3 LTS to 3.9
- Write, test and ship Spark jobs with the Scala API on the Scala version Spark supports
Revise and practise
- Practice: every exercise and quiz (17 quizzes)
Modules and lessons
What the labels mean
- Free lesson, Pro answers
- the whole lesson is free; the model answers to its interview questions open with a pass
- Pro
- opens with a Pro, Premium or Ultimate pass
Minutes are reading time.
What a pass opens in this track
34 interview answers. The same pass opens every other track and every Pro tool.
- Module 1
Start here: Scala 3.9 LTS on the JVM
What Scala 3 is and where it runs, installing Scala, a JDK and an editor, first programs, scripts and the REPL, reading compiler messages, and a map from Java and Python.
- What Scala 3 is and where it runs in 2026 Free lesson, Pro answers: 10 minutes
- Install Scala 3.9, a JDK and an editor Free lesson, Pro answers: 15 minutes
- First programs: scala run, scripts and the REPL Free lesson, Pro answers: 15 minutes
- Read Scala compiler errors and warnings Free lesson, Pro answers: 15 minutes
- Scala 3 for Java and Python developers Free lesson, Pro answers: 15 minutes
- Module 2
Basics: values, numbers, text and control flow
val, var and type inference, numbers and exact money arithmetic, strings and interpolators, if and match as expressions, methods and @main programs, and packages and imports.
- val, var, lazy val and type inference Free lesson, Pro answers: 15 minutes
- Numbers, BigDecimal and money in paise Free lesson, Pro answers: 20 minutes
- Strings, interpolators and regex Free lesson, Pro answers: 15 minutes
- if, match, loops and for as expressions Free lesson, Pro answers: 15 minutes
- Methods, parameters and @main programs Free lesson, Pro answers: 15 minutes
- Packages, imports, exports and top-level code Free lesson, Pro answers: 15 minutes
- Module 3
Domain modelling: classes, traits, case classes and enums
Classes and companion objects, traits and linearization, case classes for immutable data, enums and algebraic data types, pattern matching in depth, and opaque types.
- Classes, objects and companion objects Free lesson, Pro answers: 20 minutes
- Traits, mixins and linearization Free lesson, Pro answers: 15 minutes
- Case classes and immutable data Free lesson, Pro answers: 15 minutes
- Enums, sealed traits and ADTs Free lesson, Pro answers: 15 minutes
- Scala 3 pattern matching in depth Free lesson, Pro answers: 15 minutes
- Opaque types and value classes Free lesson, Pro answers: 15 minutes
Official documentation
- Scala 3 Book (Scala Center and EPFL (docs.scala-lang.org))
- Scala 3 Reference (Scala Center and EPFL (docs.scala-lang.org))
- Download Scala (release lines and installation) (The Scala Programming Language (scala-lang.org))
- Scala CLI documentation (VirtusLab (Scala CLI))