Kotlin Hello World
Chapter:
Kotlin
Last Updated:
11-11-2017 18:04:53 UTC
Program:
/* ............... START ............... */
// Hello World Program
package hello
fun main(args : Array<String>) {
println("Kotlin - Hello World ")
}
/* ............... END ............... */
Output
Notes:
-
Kotlin is a statically-typed programming language that runs on the Java virtual machine and also can be compiled to
- JavaScript source code or use the LLVM compiler infrastructure.
- Popular Java IDE to run Kotlin is IntelliJ IDEA.
- Steps to set up new project in IntelliJ IDEA.
- Click Create New Project.
- In menu, select Koltin > Kotlin (JVM) and hit Next to work with Kotlin/Java.
- Give the name project select location and press finish button, then you are ready to run Kotlin programs.
- Like Java package header is optional.
- Main fuunction in Kotlin takes an Array of strings as a parameter.
- Println is used to print statement as like System.out.println in java
- In Kotlin Semicolons are optional, after println there is no semicolon.
Tags
Hello World , Kotlin, Println Kotlin