Before touching Android, it helps to get comfortable with plain Kotlin. Android Studio includes a Kotlin REPL (Read-Eval-Print Loop) via Tools → Kotlin → Kotlin REPL, which lets you run snippets instantly without building a full app.

Your first program

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

Every standalone Kotlin program needs a main function as its entry point. println writes a line to standard output.

Try it in the REPL

>>> val name = "Ada"
>>> println("Hi, $name")
Hi, Ada

Notice the $name inside the string — this is string templating, one of Kotlin’s most-used conveniences. It works for full expressions too, using curly braces: println("2 + 2 = ${2 + 2}").