Kotlin – Constant and Variable declarations

This is how you declare constants in Kotlin. val a: Int = 10 val b: Long = 120 val c: Float = 1.2f val d: Int d = 10 Note that the data types start with an initial capital letter. Other data types include Float and Double. For variables, the declaration would be as shownContinue reading “Kotlin – Constant and Variable declarations”

Hello world in Kotlin

Create a new project as specified in the previous post. Right-click on src folder and select New->Kotlin File/Class. In the dialog box, specify the name of the file and click on OK. Type the following code: fun main(args: Array<String>) { println(“hello, Kotlin!”) } From the top menu bar, click on the Run->Run… . A list ofContinue reading “Hello world in Kotlin”

Kotlin IDE – How to install and configure

Want to learn Kotlin language? Use the Intellij Idea Community edition. Download from https://www.jetbrains.com/idea/download/#section=windows The IDE is open-source and has support for Java, Kotlin, Groovy and Scala.   Steps to download and configure the IDE Download from the above link. Double-click to install. If there is an old version of the IDE, choose to uninstall beforeContinue reading “Kotlin IDE – How to install and configure”

Install Oracle Java SDK 8 on Ubuntu using the Java repository

Below are the typical commands to install the Java SDK using the Java repository. sudo add-apt-repository ppa:webupd8team/java sudo apt-get update sudo apt-get install oracle-java8-installer However, I ran into problems. Here are the steps I took to install the official Java SDK on my Ubuntu virtual machine. Run the command “sudo add-apt-repository ppa:webupd8team/java“ pravin@pravin-VirtualBox:~/Desktop$ sudo add-apt-repositoryContinue reading “Install Oracle Java SDK 8 on Ubuntu using the Java repository”

Aptana Studio requires chromium browser

You might get the following error in Aptana Studio is the chromium browser is not installed in Ubuntu. Error loading browser We were unable to load the Chromium browser. Please check the documentation for details on possible workarounds/fixes.     Here’s how to fix this issue without install the chromium browser. Run this command belowContinue reading “Aptana Studio requires chromium browser”

How to setup a development environment for Ruby on Ubuntu

You will execute Ruby scripts(written in a text editor like Sublime Text) from the terminal or you can use a full fledged IDE like Aptana Studio. Below are the steps to install Ruby and its related IDE on Ubuntu. Ruby Installation Install Ruby using the command below. sudo apt-get install ruby full Verify the rubyContinue reading “How to setup a development environment for Ruby on Ubuntu”