What you’ll learn
- Chapter 1First lines – Print, remember, calculate – no prior knowledge needed.
Hallo, Kotlin! · Remembering values: val and var · Data types · Text with placeholders - Chapter 2Decisions – if, else and when.
If … otherwise: if and else · if as a value · Many cases: when - Chapter 3Lists and loops – Many values, one loop.
Lists with listOf · Every element: for · Number ranges: 1..5 · Changeable lists - Chapter 4Functions – Build your own commands.
A function of your own · Returning values - Chapter 5Safe and structured – Null safety and data classes.
Null safety · Bundling data: data class - Chapter 6Workshop: like in a real app – Process lists and build small programs.
Filtering and transforming lists · Mini project: XP analysis - Chapter 7New tools for your own ideas – Understand new concepts, fill them in and use them yourself.
map: calculating a new list · Map: finding values by name · ?.let: using an existing value - Chapter 8Level up: your next practice chapter – Understand four new building blocks in small steps and use them yourself.
filter: selecting matching minutes · sum: adding up a list of numbers · Destructuring a data class · An extension function for a number - Chapter 9Master chapter: how real programs are built – Five building blocks from real projects – explained, connected, filled in and written by you.
class: objects with state · sealed class: all cases known · Default values and named arguments · groupBy: sorting elements into groups · sortedBy: ordering by a property - Chapter 10Project tools: understand and apply – Eight more building blocks with explanation pages and four exercises per lesson.
Expressing preconditions with require · Using an existing value with let · Removing null values from a collection · Collecting records under a key · Building up a result with fold · Changing data class values with copy · when as the result of a decision · Calculating a local result with run - Chapter 11Texts and collections – Text functions, joinToString, sets, buildString and a word counter.
uppercase, startsWith and reversed · joinToString: lists as text · distinct and Set · buildString: putting texts together · Boss: count words - Chapter 12Functions in depth – Functions as values, vararg, apply and also, function references.
Functions as parameters · vararg: any number of arguments · apply and also · Function references with :: · Boss: a flexible rating - Chapter 13Objects in depth – Interfaces with default methods, abstract and open, companion object, enum class and an account.
interface with a default method · abstract, open and super · companion object and object · enum class with properties · Boss: a safe account - Chapter 14Null safety – Types with ?, safe calls with ?., fallbacks with ?:, let and safe casts with as?.
May it be null? String and String? · Fallbacks: the Elvis operator ?: · Only when there is a value: ?.let · Converting safely: as? and is · Boss: validating a form - Chapter 15data class and sealed class – Data classes with toString, equals and copy, destructuring, sealed classes and when without else.
Data without effort: data class · Changing without changing: copy · Destructuring: val (a, b) = … · A closed choice: sealed class and when · Boss: orders with states - Chapter 16Processing collections – filter and map, sortedBy, groupBy, associate and fold – data analysis in a few lines.
Selecting and transforming: filter and map · Sorting by fields: sortedBy · Grouping: groupBy · Summarising: sumOf and fold · Boss: a course evaluation
Final project: Kotlin learning companion
A small program with learning goals, a list and an evaluation.
How it works
Every lesson starts with short explanation pages. Then you practise with multiple-choice questions, fill-in-the-gap tasks, putting code in order and writing your own code – with hints and instant feedback. Free, without ads, on phone, tablet and PC.