Kotlin Sealed Classes

Having gone through the concepts of classes in Kotlin, we understand that classes form the basis for any OOP’s oriented language and Kotlin is no different. As evident from the name itself, Sealed Classes are the classes which are closed or sealed, which makes their usage restricted.

Read more

Kotlin Exception Handling

In this tutorial we will discuss about Kotlin exception handling concept in detail.

Errors, Exceptions are the developer’s nightmare as well as help guide. Let’s understand the basic difference between Error and Bugs.

Anything which breaks the normal flow of control of a program can be termed as an Exception.

Read more

Kotlin Null Safety

As a developer, we always have faced NullPointerException, or commonly known as ‘The Billion Dollar Mistake’. Every introduction of kotlin talks about the kotlin’s capablity to handle Null Pointers. Yes, take it as a relief Kotlin can handle null pointers for you, thanks to its type system.

Read more

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 are allowed to have implemented methods as well as abstract methods.

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.

Read more

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.”

Read more

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, equals and hashcode.

Read more

Subscribe For Latest Updates

Signup for our newsletter and get notified when we publish new articles for free!