Languages
Kotlin Cheat Sheet
Print-ready cheat sheet for Kotlin, organized for fast lookup, study, and desk-side use
Sample
What's in this cheat sheet
- Basics
- Functions
- Classes
- Null Safety
- Collections
- Coroutines
- Extensions
- Data Classes
- Sealed Classes
- Scope Functions
Hello World
fun main() {
println("Hello, World!")
}
Variables
val name = "Kotlin" // immutable (prefer)
var count = 0 // mutable
val pi: Double = 3.14159 // explicit type
const val MAX = 100 // compile-time constant
Basic Types
Int, Long | 32-bit / 64-bit signed integers |
Double, Float | 64-bit / 32-bit floating point |
Boolean | `true` / `false` |
Char | Single Unicode character |
String | Immutable text, supports templates |
Unit | Equivalent to `void` (single value) |
Nothing | Function never returns (e.g., throws) |
Download the full cheat sheet for all sections, formatted for print
Download PDFDownloads
Choose the treatment that matches how you read
-
Recommended
Standard
B&W, ink-efficient. The default for laser printers and photocopies
Best for Printouts and desk-side reference
-
Color
Warm color accents for on-screen reading or color printers
Best for Screen reading or color printers
-
Reference Card
Maximum density, 4-column layout. Everything on one page
Best for Fast scanning and minimum paper use