Hello World Program in Kotlin
fun main() {
println("Hello World!")
}
The keyword fun
is used to declare/define a function in Kotlin.
The special main
function is the entry point to any Kotlin program.
The println
function prints out the string argument to stdout.
If you compile and run this program, you will get the following output:
Hello World!
What's Next
If you are interested in learning Kotlin programming, then go ahead and set up a development environment.
- Next Step: Kotlin development environment setup
C C++ C# Clojure Crystal D Dart Erlang F# Go Haskell Java Javascript Julia Lua Python Rust Scala Swift Typescript