A complete, step-by-step Kotlin tutorial series. From your first “Hello World” to building real projects with coroutines, Flow, and DSLs. Every article has working code you can copy and run.
No complicated theory. Just simple explanations and real code.
Part 1: Foundations
Learn the building blocks of the Kotlin language.
| # | Tutorial | What You Will Learn |
|---|---|---|
| 1 | What is Kotlin? | What Kotlin is, why it matters, Kotlin vs Java |
| 2 | Installing Kotlin | IntelliJ IDEA setup, Kotlin Playground, first program |
| 3 | Variables and Types | val vs var, basic types, type inference, String templates |
| 4 | Null Safety | Nullable types, safe calls, Elvis operator, smart casts |
| 5 | Functions | Parameters, return types, default values, single-expression functions |
| 6 | Control Flow — if, when, for, while | if expressions, when, for/while loops, ranges |
| 7 | Classes, Objects, and Data Classes | Constructors, properties, data classes, inheritance, interfaces |
| 8 | Collections — List, Set, Map | Mutable vs immutable, filter, map, groupBy, common operations |
Part 2: Intermediate
Object-oriented and functional patterns in Kotlin.
| # | Tutorial | What You Will Learn |
|---|---|---|
| 9 | Lambdas and Higher-Order Functions | Lambda syntax, higher-order functions, SAM conversions |
| 10 | Extension Functions and Properties | Extending existing classes, extension properties, best practices |
| 11 | Scope Functions — let, run, with, apply, also | When to use each, chaining, common patterns |
| 12 | Sealed Classes, Enum Classes, and Value Classes | Sealed hierarchies, enum classes, value classes |
| 13 | Interfaces, Generics, and Type Constraints | Type parameters, variance (in/out), type bounds, reified types |
| 14 | Error Handling — try/catch, Result, and Patterns | Exceptions, Result type, runCatching, custom error handling |
| 15 | Delegation | by keyword, lazy, observable, map delegation |
| 16 | Sequences | Lazy evaluation, sequences vs collections, performance |
Part 3: Advanced
Master the features that make Kotlin powerful.
| # | Tutorial | What You Will Learn |
|---|---|---|
| 17 | Coroutines — launch, async, and Structured Concurrency | launch, async, suspend functions, structured concurrency |
| 18 | Coroutines Deep Dive | Dispatchers, exception handling, SupervisorJob, channels |
| 19 | Flow — Reactive Streams | Cold streams, operators, StateFlow, SharedFlow |
| 20 | Inline Functions, Reified Types, and Contracts | Inline functions, reified type parameters, crossinline, noinline |
| 21 | DSLs — Domain Specific Languages | Type-safe builders, receiver functions, building your own DSL |
| 22 | Kotlin Serialization and JSON | kotlinx.serialization, JSON encoding/decoding, custom serializers |
Part 4: Build Real Projects
Put everything together with practical projects.
| # | Tutorial | What You Will Learn |
|---|---|---|
| 23 | Build a CLI Tool | Command-line app, file I/O, text analysis, colored output |
| 24 | Build a REST API with Ktor | Ktor server, routing, JSON serialization, testing |
| 25 | Testing in Kotlin — JUnit 5, MockK | JUnit 5, assertions, mocking, coroutine testing |
Who is This For?
- Beginners who want to learn Kotlin from scratch
- Java developers switching to Kotlin
- Android developers who want deeper Kotlin knowledge
- Anyone who learns better by building real things instead of reading documentation
How to Use This Series
Start from Tutorial #1 and go in order. Each tutorial builds on the previous one. If you already know the basics, jump to Part 2 (Tutorial #9) for intermediate patterns.
Need a quick reference? Check the Kotlin Cheat Sheet.
Related Series
- Jetpack Compose Tutorial (25 parts)
- KMP Tutorial (20 parts)
Source Code
All code from this series is on GitHub: kemalcodes/kotlin-tutorial