Kotlin tutorial

I went through the kotlin tutorial on tutorialspoint.com and setup on my local system. I tried executing the hello world program and wollaa. This was the very first time I tried a kotlin code. I set it up on eclipse.

image

I also tried max of two nos

fun main(args: Array<String>) {
   val a:Int = 5
   val b:Int = 2
   var max: Int

   if (a > b) {
      max = a
   } else {
      max = b
   }
   print("Maximum of a or b is " +max)
}

Built With

Share this project:

Updates