Simple
Asynchronous
Object-oriented
Functional
Ideal for tests
fun main() {
    val name = "stranger"        // Declare your first variable
    println("Hi, $name!")        // ...and use it!
    print("Current count:")
    for (i in 0..10) {           // Loop over a range from 0 to 10
        print(" $i")
    }
}
Get started ↗
Concise
Safe
Expressive
Asynchronous
Interoperable
// More than 30% fewer lines of code compared to Java
// (based on the experience of Duolingo and other companies)

data class Book (
    val title: String,                         // + automatically generated equals(),
    val year: Int                              // hashCode(), toString(), and copy()
)
fun century(year: Int) = (year - 1) / 100 + 1  // Top-level function,
                                               // single-expression body
fun main() {
    val books = listOf(                        // Construct a list
        Book("Don Quixote", 1605),             // No `new` keyword
        Book("The Lord of the Rings", 1955)
    )
    val classics = books.filter { century(it.year) < 20 } // Trailing single-argument lambda
    println("Classic books: $classics")                   // Calls toString() for Book
}
Get started ↗

Cross-platform layer for native applications

Share application logic between web, mobile, and desktop platforms while keeping an experience native to users.

Save time and get the benefit of unlimited access to features specific to these platforms.

Mobile platforms Feature
Learn about Kotlin Multiplatform → Learn more →

Big, friendly and helpful
community

Kotlin has great support and many contributors in its fast-growing global community. Enjoy the benefits of a rich ecosystem with a wide range of community libraries. Help is never far away — consult extensive community resources or ask the Kotlin team directly.

Join the community →