Get the most from each lesson's compiled editor—the same habits transfer to IntelliJ, Android Studio, and CI running Gradle tests.
Recommended workflow
- Read the concept section before editing code.
- Click Run to compile with
kotlincand execute on the JVM. - Use
printlnfor debug output—avoid Android SDK imports in runnable snippets. - Change one idea at a time; read compiler errors from top to bottom.
What the runner can and cannot do
- Can — single-file
main.ktwithfun main()and stdlib - Needs local setup — Gradle multi-module projects, Android layouts, kotlinx-coroutines on classpath
Compare with Java, Go, and C# compiled tracks.
Important interview questions and answers
- Q: What prints to stdout in Kotlin lessons?
A:printlnandprintfrom the Kotlin standard library. - Q: What is the entry point?
A: Top-levelfun main()—nopublic static void mainrequired unless interoping with Java conventions.
Self-check
- What filename does the playground expect?
- What should you avoid importing in sandbox code?
Challenge
First compile and run
- Click Run with the default code.
- Confirm output appears in the terminal.
- Add a second
printlnwith your name.
Done when: the terminal shows the default message and your custom line.
Challenge
First compile and run
- Click Run with default code.
- Confirm terminal output.
- Add a custom
println.
Done when: terminal shows default and your custom line.
Interview prep
- What runs code in the playground?
kotlinc compiles main.kt; JVM runs MainKt with fun main().