Most Kotlin in this track targets the JVM—the same virtual machine as Java. Kotlin source compiles to .class files; you can mix Kotlin and Java in one Gradle or Maven project.
Key JVM concepts
fun main()inmain.ktbecomes classMainKtwith a static entry point- Kotlin types map to Java types—
IntisintorIntegerat boundaries @JvmStatic,@JvmOverloads, and@JvmNametune Java-facing APIs- JDK classes are callable from Kotlin without wrappers
Multiplatform note
Kotlin also compiles to JavaScript and Native (KMP). This track emphasizes JVM patterns; Android teaser links to local Gradle workflows with the Android SDK.
Important interview questions and answers
- Q: Can Java call Kotlin code?
A: Yes—Kotlin generates Java-compatible bytecode; expose top-level functions with@file:JvmNameor put APIs on objects with@JvmStatic. - Q: What runs Kotlin on the JVM?
A: The Kotlin compiler (kotlinc) emits bytecode executed by the JVM—same asjavacoutput for Java.
Self-check
- What JVM class name does
main.kttypically produce? - Can Kotlin use existing Java libraries?
Tip: main.kt becomes MainKt—use @JvmStatic when Java callers need static methods.
Interview prep
- Can Java call Kotlin?
Yes—use @JvmStatic, @JvmOverloads, and @file:JvmName for ergonomic Java APIs.
- What runs Kotlin on JVM?
kotlinc emits bytecode executed by the JVM—like javac for Java.