What Is Kotlin?
Kotlin is a modern, general-purpose programming language created by JetBrains — the company behind the IntelliJ IDEA and Android Studio code editors. It was announced in 2011, reached version 1.0 in 2016, and in 2019 Google made it the preferred language for Android development.
fun main() {
val name = "Kotlin"
println("Hello, $name!")
}
Hello, Kotlin!
Its defining traits:
- Concise — Kotlin removes much of the boilerplate found in older languages like Java. A class holding a name and an age takes one line.
- Null safe — the compiler tracks which values can be missing
(
null), which prevents the most common crash in many languages. - Statically typed, with type inference — every value has a fixed type, but you rarely write it; Kotlin works it out.
- Runs on the JVM — Kotlin compiles to the same bytecode as Java, so it works with every Java library, and Java and Kotlin code can live in the same project.
- Multiplatform — Kotlin can also compile to native code (for iOS, macOS, Linux, Windows) and to JavaScript or WebAssembly, so one codebase can share logic across platforms.