Kotlin flashcards
The modern language for Android apps, servers and shared mobile code.
What is Kotlin, in one plain sentence?
Kotlin is a modern programming language that lets you write shorter, safer code for Android apps, servers and more.
Tap to turn over. Swipe right if you know it, left to see it again.
What you will learn
Start from zero
- What Kotlin is and why it exists4 cards
- Key words4 cards
- Getting ready3 cards
Core basics
- Values and types2 cards
- Null safety2 cards
- Functions2 cards
- Control flow3 cards
- Classes3 cards
- Collections3 cards
- Errors2 cards
Next steps
- Functional Kotlin4 cards
- Type design4 cards
- Coroutines5 cards
- Java interop and tooling3 cards
Go deeper
- Generics in depth3 cards
- Coroutines in depth4 cards
- Language features in Kotlin 23 cards
- Multiplatform2 cards
- Performance and production6 cards
Final test and certificate
10 questions drawn fresh from the whole topic, about 15 minutes. Sign in, score 80% or more and get a free certificate with your name and a public check link anyone can open, such as an employer or a teacher. Not signed in? Try a practice test from the cards.
Take the final testAbout these cards
- Reviewed 26 October 2026
- CoversKotlin 2.4kotlinx.coroutines 1.10
Checked against
Kotlin at a glance
Kotlin is a modern, friendly programming language that Google recommends for Android apps, and that also runs on servers and shares code between phones.
Like a smart new car built on a proven engine: it runs on the same JVM as Java, but with automatic safety features and far less fuss.
Words you will meet
- Variable
- A named box that holds a value;
valboxes cannot be refilled,varboxes can - Type
- The kind of value a box holds, like a whole number or text
- Function
- A named set of steps, written with
fun - Class
- A blueprint for a kind of thing, like a customer or an order
- Object
- One real thing made from a class
- Null
- A special value meaning nothing is there
- Lambda
- A small function you can pass around like a value, written in curly braces
- JVM
- The Java Virtual Machine, the engine that runs Kotlin and Java programs
The steps
- 1. Start from zero (11 cards): What Kotlin is, where it runs and the words you need.
- 2. Core basics (17 cards): Types, null safety, functions, control flow, classes, collections and errors.
- 3. Next steps (16 cards): Extensions, scope functions, sealed types, coroutines, Flow, Java interop and Compose.
- 4. Go deeper (18 cards): Variance, inline and reified, coroutine internals, Kotlin 2 features, Multiplatform and production.
All 11 cards in Start from zero
- What is Kotlin, in one plain sentence?
- Kotlin is a modern programming language that lets you write shorter, safer code for Android apps, servers and more.
- Why was Kotlin created?
- JetBrains, the company behind popular code editors, made Kotlin in 2011 because Java code felt long and crashed often on empty values. Kotlin fixes both while working with Java code.
- Where do you meet Kotlin in daily life?
- In many Android apps on your phone, in backend servers at banks and online shops, and in apps that share code between Android and iPhone.
- What everyday picture fits Kotlin's null safety?
- A parcel counter that marks every box 'may be empty' or 'always full'. You must check a 'may be empty' box before using what is inside, so you never reach into nothing.
- What is the difference between
valandvar? valis a box you fill once and never change, like your date of birth.varis a box you can refill, like your phone's battery level.- What does null mean?
- Null means 'nothing here', like an empty seat. In Kotlin a type with
?at the end, such asString?, is allowed to be empty. - What is a lambda, in plain words?
- A small piece of code in curly braces that you hand to another function, like a note saying what to do with each item:
{ price -> price * 2 }. - How are Kotlin and Java related?
- Both run on the JVM and can call each other's code in the same project. Kotlin can also run in browsers and on iPhone through Kotlin Multiplatform.
- What do you need to start learning Kotlin?
- A computer with Android Studio or IntelliJ IDEA (free editions), or a Kotlin playground in your browser for quick tries. No Java knowledge is needed.
- What does a first Kotlin program look like?
- A
fun main()function where the program starts, avalbox that holds a name, andprintlnto show it.$namedrops the name into the text. - After this topic, what will you be able to do?
- Write clean Kotlin, read Android and server code, use coroutines for background work, and answer common Kotlin interview questions.
Kotlin cheatsheet
Basics
val x = 5 / var y = 0Fixed / changeable variablefun area(r: Double) = 3.14 * r * rSingle-expression function"Hi $name, ${a + b}"String templatesif (a > b) a else bifas expressionwhen (x) { in 1..5 -> ...; else -> ... }Pattern style branchfor (i in 0..<n step 2)Ranges and steps
Null safety
String?May be nulla?.bCall only if not nulla ?: defaultFallback when nulla!!Assert not null (avoid)x?.let { use(it) }Run block if not null"12".toIntOrNull()Parse without exceptions
Classes
data class P(val x: Int)Value with equals, copy, toStringsealed interface ResultClosed set of typesobject ConfigSingle instancecompanion object { }Class-level membersenum class Status { NEW, PAID }Fixed values@JvmInline value class Id(val v: Long)Zero-cost wrapper
Collections
listOf / mutableListOfRead-only / changeable listmapOf("a" to 1)Map from pairsfilter { } .map { }Keep and transformgroupBy { it.city }Group into a mapassociateBy { it.id }Index by keyasSequence()Lazy processing
Coroutines
suspend fun f()Pausable functionscope.launch { }Start a jobasync { } .await()Parallel resultwithContext(Dispatchers.IO) { }Run blocking work safelyflow { emit(x) } .collect { }Stream of valuesrunTest { }Test with virtual time