Kotlin Easy Basics 1 – Hello, World

kotlin easy basics tutorial by grauenwald.com

I am excited about your interest in Learning Kotlin! Kotlin is a fairly new programming languages with the goal to push Java from it’s android development throne. In this easy tutorial you will learn the fundamental basics of Kotlin.

I believe that the first step in learning any programming language is making sure you know the basics and the Syntax.

In this handy article we will teach you the beautiful core soul of Kotlin.

Hello World!

// Hello World
fun main(args : Array<String>) {
    println("Hello, World!")
}

If you run the code the output will be:

Hello, World!

Now you’re part of the programming club!

How does it work?

// Hello World – Any line starting with // represents a comment in Kotlin. Comments are ignored by the compiler and are only intended for the developer reading the code.

fun main(args : Array<String>) { . . . } – This is the main function, which is a need for every Kotlin application. The compiler starts executing the code from the main function. The main function takes an array of strings as parameters and returns Unit (nothing). We will talk about parameters and functions in the next chapters!

println(“Hello, World!”) – The println() functions prints the given message, which is in this case the string “Hello, World!”

Read the next part Kotlin Easy Basics 2 — Click Here