Thursday, June 16, 2016

First Application in Kotlin


"Hello World" is the first program we learn in almost every language.
Here also we r going to learn how to print "Hello World" using Kotlin and IntelliJ.

As we have learnt to how to create a project in IntelliJ in our last blog/tutorial .

So continuing from the same point...

Go to left side on Project View in IntelliJ, Go to src and right click on src and select New, then select Kotlin File/Class and give any name you like.




I have given name HelloWorld to it because it is printing Hello World.

Now lets starting writing code for HelloWord.kt


fun main(args: Array<String>) {
    var str ="Hello World"; 
    println(str);
}

It will print Hello World as output.


No comments:

Post a Comment