How this Kotlin track works
- kotlinc in the playground — write a single
main.ktwith top-levelfun main()andprintln; the dev runner compiles withkotlincand runsMainKton the JVM. - JVM-first, Android as context — lessons teach Kotlin syntax and stdlib on the JVM. Coroutine lessons use threads or println demos when kotlinx-coroutines is not on the classpath; full
runBlockingand Flow appear in Gradle/Android projects locally. - Prerequisites — finish Java first for JVM and OOP context. Compare with JavaScript, C#, and Go when choosing stacks.
Kotlin powers Android, Spring Boot, Ktor, and Gradle plugins. Multi-module Gradle, Compose UI, and kotlinx-coroutines run locally—sandbox lessons keep one file without Android SDK imports.
Install on your device (macOS, Linux, Windows)
Kotlin on the JVM needs JDK and the Kotlin compiler.
macOS
brew install openjdk@21 kotlin
Linux
sudo apt install -y openjdk-21-jdkthen Kotlin CLI via Snap/SDKMAN or zip from GitHub releases.
Windows
winget install Microsoft.OpenJDK.21and install Kotlin from kotlinlang.org.
Verify: kotlinc -version and java -version.
Run code on this site (Backend & language playgrounds)
- Clone or open this project locally; copy
.env.exampleto.env. - Ensure
LEARNING_RUNNER_ENABLED=trueandLEARNING_RUNNER_URL=http://127.0.0.1:9999/v1/execute. - Terminal 1:
php artisan serve(orcomposer run devfor Laravel + Vite + runner together). - Terminal 2:
npm run runner— keep it running while you click Run on server.
Kotlin is a modern, statically typed language that runs on the JVM, compiles to JavaScript, and targets native platforms. JetBrains designed it for concise syntax, null safety, and first-class coroutines—making it the preferred language for new Android apps and a growing choice for server-side Spring services.
How this track differs from Java and Python
After the Java track, you know classes, interfaces, and JVM bytecode. Kotlin targets the same JVM but removes boilerplate, adds null-safe types, and treats functions as values. Compared to Python, Kotlin is statically typed with inference—more like C# than dynamic scripting.
Unlike browser-first JavaScript, this track focuses on JVM Kotlin with kotlinc in the playground. Android UI lessons appear as a teaser—full Android SDK work runs locally with Gradle.
What you will learn
- Syntax: variables, strings, control flow, functions, and null safety
- OOP: classes, data classes, inheritance, interfaces, objects, sealed types
- Collections: lists, maps, sets, lambdas, extensions, generics, delegation
- Async: exceptions, coroutines, flows, and scope builders
- Tooling: packages, Gradle, file I/O, testing, Java interop
- Interview essentials, production habits, and Android context
Playground setup
This topic uses server_compiled: your code compiles with kotlinc as a single main.kt file. Use fun main() and println for output—the JVM entry class is MainKt. We recommend finishing Java first for JVM and OOP context.
Important interview questions and answers
- Q: What is Kotlin best known for?
A: Concise JVM syntax, null safety, coroutines, Android adoption, and seamless Java interop. - Q: Does Kotlin replace Java on the JVM?
A: Kotlin compiles to JVM bytecode and calls Java libraries directly—teams often mix both languages in one project.
Self-check
- In one sentence, why do Android teams prefer Kotlin?
- Why do we recommend Java fundamentals before this track?
Tip: Finish Java first—Kotlin builds on JVM classes with null safety and coroutines.
Interview prep
- What is Kotlin in one sentence?
A modern statically typed JVM language with null safety, coroutines, and strong Java interop—default for new Android apps.
- Why learn Kotlin after Java?
Java teaches JVM and OOP; Kotlin adds concise syntax, null-safe types, and coroutines while reusing Java libraries.