Kotlin – IntelliJ IDEA Hello World

Screenshot 20181225 122513

Start Intellij and click Create new Project Select Kotlin from the left panel and then Kotlin/JVM from the right panel. Click Next. Specify a project name, location and everything else you need to. Click Finish. Expand Hello World, right-click src, select New and then Kotlin File/Class. This way you will create a new file at the src folder. You will see the following window. Specify the name and click OK. Type the following code: fun main(args: Array<String>){ println(“Hello World!!!”)} In Kotlin the main entry point is the main function. The…

Kotlin – IntelliJ IDEA Hello World Read More

Kotlin – Command line compiler and Hello World

Screenshot 20181224 125316

You can download the command line compiler from here. On UNIX based systems (Linux, OS X, Solaris etc) you can download it and installing it by running the following: curl -s https://get.sdkman.io | bash Then type the line below the line that says Please open a new… It will be different for you source “/home/kronos/.sdkman/bin/sdkman-init.sh” Then install kotlin sdk install kotlin You can find more information here. Now let’s run our first small application, Hello World. Use an editor and copy paste the following and save it as helloWorld.kt: fun main(args: Array) {…

Kotlin – Command line compiler and Hello World Read More