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

Kotlin

Kotlin 2.4 on the JVM: values and null safety, functions and classes, collections, coroutines and Flow, Java interop, testing and back-end services.

16 lessons to read 3 modules

16 lessons: 8 free with Pro answers and 8 with a free core.

Examples run with Kotlin 2.4.20.

Who it is for

Android developers and JVM back-end developers who already program in another language, and Java developers who want a fast map of Kotlin before going deep on coroutines, Flow and back-end work.

What you will be able to do

  • Install Kotlin 2.4 and a JDK, run programs, scripts and Gradle builds, and read what the compiler reports
  • Write Kotlin with values, types, control flow, functions, lambdas and extension functions
  • Use nullable types, safe calls, smart casts and platform types to keep null where it belongs
  • Model data with classes, objects, interfaces, sealed types, value classes and generics with variance
  • Choose and transform collections, sequences and maps by what each operation costs
  • Handle errors, resources, files, time, IDs and opt-in APIs safely
  • Write structured concurrent code with coroutines, cancellation, supervision, channels and Flow
  • Call Java from Kotlin and back, and use DSLs, context parameters and preview features with care
  • Test, build and check code with kotlin.test, Kotest, MockK, Gradle and static analysis
  • Build back-end services and multiplatform code, and prepare for Android and Kotlin interviews

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
Free core, Pro depth
the core of the lesson is free; its in-depth parts open with a pass
Pro
opens with a Pro, Premium or Ultimate pass

Minutes are reading time: “9 of 25 min free” means 9 minutes of the lesson are free.

What a pass opens in this track

17 in-depth parts and 40 interview answers. The same pass opens every other track and every Pro tool.

  1. Module 1

    Start here: Kotlin 2.4 on the JVM

    What Kotlin is and where it runs, installing Kotlin, a JDK and an editor, first programs with kotlinc and kotlinr, a Gradle project, compiler messages, and scripts.

    1. What Kotlin is and where it runs Beginner Free lesson, Pro answers: 15 minutes
    2. Install Kotlin, a JDK and an editor Beginner Free lesson, Pro answers: 15 minutes
    3. Your first program with kotlinc and kotlinr Beginner Free lesson, Pro answers: 10 minutes
    4. A Gradle project for Kotlin from scratch Beginner Free lesson, Pro answers: 15 minutes
    5. Read compiler errors, warnings and opt-ins Beginner Free lesson, Pro answers: 15 minutes
    6. Kotlin scripts, the REPL and notebooks Beginner Free lesson, Pro answers: 15 minutes
  2. Module 2

    Values, types and control flow

    val and var with type inference, numbers and overflow, strings and templates, parsing text, if and when as expressions, loops and ranges, functions, and a map for Java developers.

    1. val, var and type inference Beginner Free lesson, Pro answers: 15 minutes
    2. Numbers, conversions and overflow Beginner Free core, Pro depth: 9 of 25 minutes free
    3. Strings, characters and string templates Beginner Free core, Pro depth: 8 of 20 minutes free
    4. Parse text and format Indian numbers Beginner Free core, Pro depth: 7 of 20 minutes free India-specific
    5. if and when expressions Beginner Free core, Pro depth: 6 of 15 minutes free
    6. Loops, ranges and labelled jumps Beginner Free core, Pro depth: 4 of 10 minutes free
  3. Module 3

    Null safety

    Nullable types, safe calls and Elvis, smart casts and safe casts, nulls inside collections and generics, and platform types from Java.

    1. Nullable types, safe calls and Elvis Beginner Free lesson, Pro answers: 10 minutes
    2. Smart casts, is checks and safe casts Beginner Free core, Pro depth: 6 of 15 minutes free
    3. Nulls inside collections and generics Beginner Free core, Pro depth: 4 of 10 minutes free
    4. Platform types and Java nullability Intermediate Free core, Pro depth: 6 of 15 minutes free

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.