Your country

Tools that support it use your country for local currency, number formats, units and paper size. Your choice is saved only in this browser.

Type a name or a two-letter code. Use the up and down arrow keys to move through the countries, Enter to choose one and Escape to close.

Programming languages

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 to read 3 modules

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

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.

  1. 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.

    1. What Scala 3 is and where it runs in 2026 Beginner Free lesson, Pro answers: 10 minutes
    2. Install Scala 3.9, a JDK and an editor Beginner Free lesson, Pro answers: 15 minutes
    3. First programs: scala run, scripts and the REPL Beginner Free lesson, Pro answers: 15 minutes
    4. Read Scala compiler errors and warnings Beginner Free lesson, Pro answers: 15 minutes
    5. Scala 3 for Java and Python developers Beginner Free lesson, Pro answers: 15 minutes
  2. 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.

    1. val, var, lazy val and type inference Beginner Free lesson, Pro answers: 15 minutes
    2. Numbers, BigDecimal and money in paise Beginner Free lesson, Pro answers: 20 minutes
    3. Strings, interpolators and regex Beginner Free lesson, Pro answers: 15 minutes
    4. if, match, loops and for as expressions Beginner Free lesson, Pro answers: 15 minutes
    5. Methods, parameters and @main programs Beginner Free lesson, Pro answers: 15 minutes
    6. Packages, imports, exports and top-level code Beginner Free lesson, Pro answers: 15 minutes
  3. 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.

    1. Classes, objects and companion objects Beginner Free lesson, Pro answers: 20 minutes
    2. Traits, mixins and linearization Intermediate Free lesson, Pro answers: 15 minutes
    3. Case classes and immutable data Beginner Free lesson, Pro answers: 15 minutes
    4. Enums, sealed traits and ADTs Beginner Free lesson, Pro answers: 15 minutes
    5. Scala 3 pattern matching in depth Intermediate Free lesson, Pro answers: 15 minutes
    6. Opaque types and value classes Intermediate Free lesson, Pro answers: 15 minutes

Official documentation

More in Programming languages

Quick answers and tool search

Type to search tools or to get a quick answer, for example 18% of 2500. Use the up and down arrow keys to move through the results, Enter to choose, and Escape to close.