Kotlin Hello World

By | October 8, 2017

Kotlin Hello World

This is kotlin programming language Series Tutorial. Here i have tried to use kotlin latest version. Today we will learn how to setup Intellij IDEA to print “hello world” in Kotlin.

Steps:

1st step: Open Intellij IDEA then click create new project

kotlin hello world Kotlin Hello World 1 300x169

2nd Step: Select Gradle from left side and select Java (not needed) & Kotlin . note: Project sdk must be selected. if your project sdk is null then download java sdk from link . then click next

 

kotlin hello world Kotlin Hello World 2 300x169

 

3rd step: No need to change anything , click next

kotlin hello world Kotlin Hello World 4 300x169

 

4th Step: ArtifactId filed (which is the project name )write HelloWorld and without changing anything click next

kotlin hello world Kotlin Hello World Screenshot from 2017 10 08 23 38 22 300x169

 

5th Step: Project location you can change , if you not change its default location it store

kotlin hello world Kotlin Hello World Screenshot from 2017 10 08 23 38 38 300x169

 

6th Step: Wait for sometime to download grade from maven repository , ??? then after complete

kotlin hello world Kotlin Hello World Screenshot from 2017 10 08 23 39 55 300x169

 

You will see the project structure of your project . Inside src/main/kotlin folder right click then new =>Kotlin file/Class select then this pop up comes

kotlin hello world Kotlin Hello World Screenshot from 2017 10 08 23 41 41 300x169


Last step:
 Type HelloWorld in Name textbox then click ok

kotlin hello world Kotlin Hello World Screenshot from 2017 10 08 23 43 18 300x169

 

??? Now project setup is done . Here we can start writing code.

Every programming language start its work inside a main method, kotlin language also same in patter.  Write

 

then click left side Kotlin icon then click Run , After complete Build below windows see the text hello world in kotlin/ kotlin hello world and complete your task .

 

 

 

 

Leave a Reply