Kotlin by Example: Reading from standard input

fun main() {
    println("What is your name?")

In Kotlin, we can read a line from standard input with readln.

    val name = readln()

    println("Hello, " + name + "!")
}
$ kotlinc main.kt -include-runtime -d main.jar
$ java -jar Main.jar
What is your name?
Ruben
Hello, Ruben!