Lesson 1 / 25
What Kotlin Is
A pragmatic language with first-class Java interop.
Statically typed, concise and interoperable
Kotlin is a statically typed, general-purpose language created by JetBrains and released as 1.0 in 2016. It compiles to JVM bytecode, to JavaScript and WebAssembly, and to native binaries via Kotlin/Native. Google made it the preferred language for Android development in 2019. Kotlin is designed for 100% interoperability with Java: you can call Java libraries from Kotlin and Kotlin code from Java in the same project. Its main selling points are concise syntax, null safety in the type system, functional programming support and coroutines for asynchronous code. Kotlin 2.0 introduced the new K2 compiler.
A concise, safe language for many platforms
Kotlin is a statically typed language from JetBrains that runs on the JVM, Android, the browser and native targets.
Hello, Kotlin
A top-level main function needs no class.
// Main.kt
fun main() {
val language = "Kotlin"
println("Hello, $language!")
}A modern renovation of a solid house
Kotlin keeps the foundations of the JVM and its huge library ecosystem, but modernises the rooms you live in every day: less boilerplate, safer nulls and better tools for concurrency.
Quick check: Which statement about Kotlin is accurate?
- It is dynamically typed
- It only runs on Android
- It interoperates with Java and can use existing Java libraries
- It requires every function to live inside a class
Answer
It interoperates with Java and can use existing Java libraries — Kotlin targets the JVM, Android, JS/Wasm and native, and calls Java directly.