# Kotlin

> A newer language that runs side by side with Java. The top pick for Android apps.

**Field:** Software Development  
**Category:** Languages

## Think of it like

Think of it like a newer model of a trusted bike. Same frame and parts fit, but the ride is smoother.

## Definition

Kotlin is a modern language that runs on the same JVM as Java. It works side by side with Java code, so teams can switch one file at a time. It needs less code than Java for the same job and guards against null mistakes. It is free to use and open source. Most new Android apps are now written in Kotlin.

## Example

Google named Kotlin the first choice for Android in 2019. A team in Berlin then moves its app over, file by file.

## Example code

```kotlin
fun main() {
    println("Hello, world!")
}
```

Shorter than the Java version, and it runs on the same machine.

## Why it matters

Anyone building for Android today will meet Kotlin. It also runs on servers and in shared mobile code.

## Common mistake

Thinking you must rewrite all Java code first. Kotlin and Java live happily in one project.

## Three principles

- **Works with Java.** Both run on the JVM together.
- **Less code.** The same job takes fewer lines.
- **Null-safe.** It checks for empty values before running.

## Related terms

- [Java](https://learn.benibix.com/term/development/java)
- [Swift](https://learn.benibix.com/term/development/swift)
- [Dart](https://learn.benibix.com/term/development/dart)
- [Null](https://learn.benibix.com/term/development/null)
- [Jetpack Compose](https://learn.benibix.com/term/development/jetpack-compose)
- [Gradle](https://learn.benibix.com/term/development/gradle)
- [Java Virtual Machine (JVM)](https://learn.benibix.com/term/development/java-virtual-machine)

## Taught in

- [Swift, Kotlin and Dart](https://learn.benibix.com/learn/development-languages/swift-kotlin-and-dart): Programming Languages, 9/12

---

Source: https://learn.benibix.com/term/development/kotlin
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
