Kotlin first programs with null safety
8 steps · about 3 h 40 min · Beginner
- Run your first Kotlin lines (tutorial, JetBrains (Kotlin docs), 15 min)
Start with println, val and var so the rest of the language has a working base.
- Let the compiler infer types (tutorial, JetBrains (Kotlin docs), 15 min)
See which basic types exist and when an explicit type annotation actually helps.
- Branch with when and loop over ranges (tutorial, JetBrains (Kotlin docs), 25 min)
Kotlin's when expression and ranges replace most switch statements and index loops.
- Hold data in lists, sets and maps (tutorial, JetBrains (Kotlin docs), 25 min)
Learn the read-only versus mutable split early, before it surprises you in real code.
- Write functions and lambdas (tutorial, JetBrains (Kotlin docs), 30 min)
Default arguments, single-expression functions and lambdas make up most everyday Kotlin.
- Model data with classes and data classes (tutorial, JetBrains (Kotlin docs), 25 min)
Data classes give equality and copying for free, so you can model records in one line.
- Handle missing values safely (tutorial, JetBrains (Kotlin docs), 25 min)
Safe calls and the Elvis operator are the feature that sets Kotlin apart; practise them on real cases.
- Drill the basics with Kotlin Koans (interactive, JetBrains (Kotlin Playground), 1 h)
Short in-browser exercises confirm each idea sticks before you start a project.