A sealed class is used for representing restricted class hierarchy where an object or a value can have one of the types from a limited… [Read More]
Kotlin Data Class with examples
In Kotlin, you can create a data class to hold the data. The reason why would you want to mark a class as data is… [Read More]
Kotlin Nested and Inner Class with examples
In this guide, you will learn about nested and inner class in Kotlin with the help of examples. Kotlin Nested Class When a class is… [Read More]
Kotlin Interfaces with examples
In this guide, we will learn about interfaces. Similar to an abstract class, an interface cannot be instantiated because it doesn’t have any constructor. Points… [Read More]
Kotlin Abstract Class with examples
An abstract class cannot be instantiated, which means we cannot create the object of an abstract class. Unlike other class, an abstract class is always… [Read More]
Kotlin Visibility Modifiers – public, private, protected and internal
Visibility modifiers restrict the access of classes, interfaces, functions, properties, constructors etc. to a certain level. In kotlin we have four visibility modifiers – public,… [Read More]
Kotlin Inheritance with examples
Inheritance is a feature using which a class inherits all the features of another class. The class from which the features are inherited is known… [Read More]
Kotlin Constructors with examples
The main purpose of constructor is to initialize the properties of a class. Constructor is called when we create the object of a class. In… [Read More]
Kotlin Class and Objects – Object Oriented Programming (OOP)
Kotlin is an object oriented programming language just like Java. Object oriented programming (OOP) allows us to solve the complex problem by using objects. In… [Read More]
Kotlin Try as an expression in Exception handling
The try block in Kotlin can work as an expression. It can return a value just like any other expression, the returned value can be… [Read More]
- 1
- 2
- 3
- …
- 5
- Next Page »