Get Started with Kotlin on Android

In this blog, we’re going to take a look at Kotlin, a new language in the JVM world, and some of its basic features, including classes, inheritance, conditional statements, and looping constructs.

Defining function in kotlin

Defining variables

Using when expression it’s more like switch case.

Using a for loop

Constructors

A class in Kotlin can have a primary constructor and one or more secondary constructors. The primary constructor is part of the class header  it goes after the class name (and optional type parameters).

Have you notice there no semicolon in sentences in Kotlin you don’t have to put the semicolon at the end of sentences. Null-safety is an important feature of the Kotlin language. It helps developers avoid NullPointerExceptions and improves the quality of their apps.

. . .

Comment

Add Your Comment

Be the first to comment.

css.php
Hire Us!
Brief us about your requirements and we'll get back to you.
Woo! Hooy!
We have just recieved your project brief and our expert will contact you shortly.
Send Again
Close