Kotlin Tutorial · Kotlin Basics · Lesson 1 of 31
Kotlin Introduction
What Kotlin is, where it's used (Android, servers, multiplatform), and what a Kotlin program looks like.
What is Kotlin?
Kotlin is a modern, statically typed language created by JetBrains. It runs on the JVM (and also compiles to JavaScript, WebAssembly and native code), works with any Java library, and is Google's preferred language for Android. It's concise, has null safety built into the type system, and supports both object-oriented and functional styles.
Kotlin is used for Android apps, backend services (Spring Boot, Ktor), Gradle build scripts and, with Kotlin Multiplatform, for sharing code between Android, iOS, desktop and web.
Hello, World!
fun main() {
println("Hello, World!")
val language = "Kotlin"
println("Welcome to $language")
}
Output
Hello, World! Welcome to Kotlin
Run this on your computer — see “Get Started” for setup.
A Kotlin program starts in fun main(). There are no semicolons and no class is required around main. The
examples on this site show the program and its output; each was compiled with the Kotlin compiler and run on
the JVM.
Test yourself
Which company created Kotlin?
GoogleJetBrainsOracleApple
Show answer
Answer: JetBrains