TodayTools

Kotlin flashcards

The modern language for Android apps, servers and shared mobile code.

Donate
Beginner friendly, starts from zero
Section
How to study
0
KotlinStart from zero · 1 of 11

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.

Less typing, fewer crashes.
Show again
11 left
Got it

Tap to turn over. Swipe right if you know it, left to see it again.

All topics

What you will learn

  1. Start from zero

    • What Kotlin is and why it exists4 cards
    • Key words4 cards
    • Getting ready3 cards
  2. Core basics

    • Values and types2 cards
    • Null safety2 cards
    • Functions2 cards
    • Control flow3 cards
    • Classes3 cards
    • Collections3 cards
    • Errors2 cards
  3. Next steps

    • Functional Kotlin4 cards
    • Type design4 cards
    • Coroutines5 cards
    • Java interop and tooling3 cards
  4. 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 test

About these cards

  • Reviewed 26 October 2026
  • CoversKotlin 2.4kotlinx.coroutines 1.10
How these cards are made

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; val boxes cannot be refilled, var boxes 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. 1. Start from zero (11 cards): What Kotlin is, where it runs and the words you need.
  2. 2. Core basics (17 cards): Types, null safety, functions, control flow, classes, collections and errors.
  3. 3. Next steps (16 cards): Extensions, scope functions, sealed types, coroutines, Flow, Java interop and Compose.
  4. 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 val and var?
val is a box you fill once and never change, like your date of birth. var is 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 as String?, 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, a val box that holds a name, and println to show it. $name drops 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 = 0 Fixed / changeable variable
  • fun area(r: Double) = 3.14 * r * r Single-expression function
  • "Hi $name, ${a + b}" String templates
  • if (a > b) a else b if as expression
  • when (x) { in 1..5 -> ...; else -> ... } Pattern style branch
  • for (i in 0..<n step 2) Ranges and steps

Null safety

  • String? May be null
  • a?.b Call only if not null
  • a ?: default Fallback when null
  • a!! 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, toString
  • sealed interface Result Closed set of types
  • object Config Single instance
  • companion object { } Class-level members
  • enum class Status { NEW, PAID } Fixed values
  • @JvmInline value class Id(val v: Long) Zero-cost wrapper

Collections

  • listOf / mutableListOf Read-only / changeable list
  • mapOf("a" to 1) Map from pairs
  • filter { } .map { } Keep and transform
  • groupBy { it.city } Group into a map
  • associateBy { it.id } Index by key
  • asSequence() Lazy processing

Coroutines

  • suspend fun f() Pausable function
  • scope.launch { } Start a job
  • async { } .await() Parallel result
  • withContext(Dispatchers.IO) { } Run blocking work safely
  • flow { emit(x) } .collect { } Stream of values
  • runTest { } Test with virtual time
Donate