Kotlin Hello World Program
Kotlin Hello World Program
In this tutorial, we will learn how to write a Hello World program in Kotlin language. We will go through each statement of the program.
Kotlin Program
fun main() {
println("Hello, World!")
}
Output
Hello, World!
Working of the "Hello, World!" Program
fun main()
This line defines the main function, which is the entry point of the program in Kotlin.{
This opening brace marks the beginning of the main function's body.println("Hello, World!")
This line prints the string "Hello, World!" to the standard output. The println
function adds a new line after the text.}
This closing brace marks the end of the main function's body.