Thuta Learning
BasicProgrammingbeginner

Syntax & Hello World

Relax. We'll talk through this in plain words — no textbook voice.

The basic shape of a Kotlin program is simple. You declare a function with fun, and write the code you want to run inside main(). Statements don't need a semicolon at the end, which keeps the code looking clean and easy to read.

kotlin
fun main() {
    println("Hello, World!")
    println("Kotlin code က ဒီလိုစပါတယ်။")
}
You should see
Hello, World! That's how Kotlin code gets started.

Summary

Once you know main(), println(), and how quotes, braces, and indentation work in Kotlin syntax, you're ready to write your first program.

Easy traps

  • You can't write a String with single quotes like 'Hello' — single quotes are for a single character.

Practical example — user greeting

Practical example — user greeting

kotlin
fun main() {
    val userName = "Aung"
    println("Welcome, $userName!")
    println("Kotlin learning စလိုက်ကြမယ်။")
}

You'll know it worked when: Welcome, Aung! Let's get started learning Kotlin.