Menu
Coddy logo textTech

Hello World!

Part of the Fundamentals section of Coddy's Kotlin journey. Lesson 2 of 93.

The "Hello World!" is a simple program that outputs Hello World! to the screen.

In Kotlin, we use println() to show words on the screen. The words go inside double quotation marks.

Execution of this console program starts in fun main(). Kotlin also allows functions, classes and properties outside main:

fun main() {
    println("Hello World!")
}

Note: println() prints the text and moves to a new line. There is also print() which prints without moving to a new line.

challenge icon

Challenge

Beginner

Write a program that prints Ready to explore! on the first line and My first program on the second line. Match the capitals, spaces and punctuation exactly.

Try it yourself

fun main() {
    
}
quiz iconTest yourself

This lesson includes a short quiz. Start the lesson to answer it and track your progress.

All lessons in Fundamentals

Practice on your own: Kotlin playground