Lesson 1 of 17

Hello, World!

Your First Kotlin Program

Kotlin programs start with a main function — the entry point where execution begins.

fun main() {
    println("Hello, World!")
}
  • fun declares a function
  • main is the required entry point
  • println prints a line to standard output (with a newline at the end)
  • print prints without a trailing newline

Your Turn

Print the message Hello, Kotlin! to the output.

JS Transpiler loading...
Loading...
Click "Run" to execute your code.