Hello world application in Kotlin

Kotlin Hello World Application

To get started open your editor and type the snippet of code below

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

in kotlin main is the entry point function of an application

fun keyword is used for declaring functions it acts like function does in JavaScript.

Compile your application into jar
kotlinc hello.kt -include-runtime -d hello.jar

Execute your application
java -jar hello.jar

If everything went well you should see "Hello World" output from your terminal


Popular posts from this blog

How to get user's ip address in JavaScript

How to make a static http server in nodejs using express

Array concat method in JavaScript

What is 'this.' keyword in JavaScript

How to create promises in JavaScript