Hello, Kotlin!

Kotlin is clean and elegant. You can jump straight into the main idea without much ceremony.

Your first magic word is main. Type main and press Enter.

Kotlin autocomplete The entry point fun main() { } appears.

Kotlin main Now type this:

fun main() {
    println("Hello, Kotlin!")
}

Press the green play button to run it.

Kotlin run

If you see Hello, Kotlin!, you did it.

Wait, what does this code mean?

The Kotlin line:

println("Hello, Kotlin!")

In plain English:

Print "Hello, Kotlin!" and move to the next line

println is a familiar word: print. The ln stands for “line,” meaning move to the next line.

So where does the word “print” get its message? To a computer, the parentheses are the part that means “say this.”

And Hello, Kotlin! is just the text itself.