Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

The First Hello World

Writing your first program in Kaori is quite simple and the main function does not need a return type annotation, because the entry point of the program does not need to return values.

fun main() {
    print("hello world");
}

That’s it! Just define a main function and use the print statement to output text to the console.