Kotlin – Hello World


// This program just demonstrates usage of println function
// nice usage of the word, 'fun'
fun main(args:Array){
// So, helloWorld is a fun, which takes an argument which is named as args and is having a type: Array of String
// Similar to Java, we have a main method here in Kotlin, where execution of our application starts.
// It is very simple compared to Java code
// Simple in the sense that, with less code, we are able to get things done
class Main{
public static void main(String args[]){
System.out.println("Hello World");
} */
println("Hello World") // in Kotlin, we don't need to add semicolon, for end of statement. Something similar to Python.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s