Kotlin · Module 1 · Lesson 11 min read

What is Kotlin?

Kotlin in one minute

Kotlin is a modern, statically typed language made by JetBrains (the company behind Android Studio's IntelliJ). In 2019 Google made it the preferred language for Android, and most new Android apps are written in it.

Why developers love it

  • Concise: often 30–40% less code than Java.
  • Null-safe: the compiler prevents most NullPointerException crashes.
  • 100% interoperable with Java: use any Java library, and mix both in one project.
  • Modern features: data classes, extension functions, lambdas, coroutines for async work.
  • Multiplatform: Android, server (Ktor, Spring), desktop, web, and iOS through Kotlin Multiplatform.

Your first program

kotlin
fun main() {
    println("Hello, Kotlin!")
}
  • fun declares a function; main is where the program starts.
  • No semicolons needed, and no class required for main.
  • println prints with a new line; print doesn't add one.

How it runs

Kotlin compiles to JVM bytecode (like Java), so it runs on Android and servers. It can also compile to JavaScript or native code.

Where to practise

play.kotlinlang.org (in the browser), IntelliJ IDEA Community (free) or Android Studio.

💻 Kotlin code can't run inside this app. Copy an example and try it at play.kotlinlang.org.

Example

kotlin
fun main() {
    println("Hello, Kotlin! 🟣")

    val name = "Kodi"
    val year = 2026
    println("I'm $name and it's $year")
    println("Next year is ${year + 1}")

    print("No new line… ")
    println("now there is.")

    println(listOf("Android", "Server", "iOS").joinToString(" • "))
}