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 ↗

Share code on 2024澳洲体彩幸运10开奖直播平台 platforms

Simplify the development of cross-platform projects with Kotlin Multiplatform. It reduces time spent writing and maintaining the same code for different platforms while retaining the flexibility and benefits of native programming. Kotlin applications will work on different operating systems, such as iOS, Android, macOS, Windows, Linux, watchOS, and others.

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 →
友情链接: 幸运澳洲10开奖结果历史手机查询 极速赛车一分钟开奖最快官网 极速飞艇168开奖官网-开奖结果在线查询 168飞艇SG开奖结果查询记录 最新澳洲幸运8开奖结果+开奖记录 在线澳门六开彩开奖结果视频查询 香港6合开奖记录查询结果 一分钟极速赛车168官方开奖结果查询 168正规开奖网站