Author name: Admin

Kotlin Interface

Talking about interface, there are two types of implementations which exists, the pre Java 8 ones where interfaces could contain only abstract methods. But in the recent update of Java 8, where interfaces were allowed to have implementations of methods as well as abstract methods. Kotlin offers similar type of interfaces i.e. Interface in kotlin …

Kotlin Interface Read More »

Kotlin Abstract Class

A class which is declared with keyword ‘abstract’ is termed as Abstract Class, these can also be termed as classes which can’t be instantiated. Or in Simple words, we cannot create objects of Abstract classes. Similar to Java, abstract classes in Kotlin can be inherited in sub classes.

Kotlin Constructors

Having read about the kotlin classes and objects, let’s have a look at initialization of class objects. This can be done using constructors. So in simple words: “A constructor is a special member function which is called when the object is instantiated or created.”

Kotlin Data Classes

Having read about classes and objects in detail, we now can recall of scenarios in our applications where we create certain classes which act as place holder for the data. Along with data these classes contain basic standard functions and utilities. The common functions these class hold are the getters, the setters, the toString method, …

Kotlin Data Classes Read More »

Kotlin Classes and Objects

Before we move ahead with the basic user defined data structure of classes and the ways to use them by the means of Object, let’s have a look at the fundamentals which go inside Kotlin.

Kotlin return Statement

We have often encountered scenarios where we want to use a function to return a value, like say a function to return a Boolean if passed String contains special characters, this is what exactly we will try to understand in this tutorial. Kotlin is a simple way of doing it by using return statement.