Kotlin OOPs Concept

Kotlin Constructor in Inheritance

In this article, you will learn about Constructors (both primary and secondary constructor) behavior in Inheritance, in Kotlin with the help of examples. A constructor for a class is a special member function, which is called implicitly, just after the memory is allocated for the object to initialize the properties of the newly created object …

Kotlin Constructor in InheritanceRead More »

Kotlin Inheritance

In this tutorial, we will learn about Inheritance in Kotlin with the help of examples. Inheritance Inheritance is one of the key feature of OOP (Object Oriented Programming). Inheritance can be defined as the process where one class is allowed to inherit the features (properties and functions) of another class. The class which inherits the features of other …

Kotlin InheritanceRead More »

Kotlin Extension Function

In this article, you will learn to extend a class with new functionality using extension functions. Extension Function Kotlin provides the ability to add methods to the existing classes without having to inherit from the class or use design patterns such as Decorator to do this. This is achieved using special declarations called extensions. Using …

Kotlin Extension FunctionRead More »

Kotlin Constructor

In this article, you will learn about constructors in Kotlin (both primary and secondary constructors) as well as initializer blocks with the help of examples. Constructor A constructor for a class is a special member function, mainly used to initialize the properties of the newly created object of that class type. It is called implicitly, …

Kotlin ConstructorRead More »

Kotlin Class and Objects

In this article, you will be introduced with the basic OOPs concept i.e. Classes and Objects and how you can create classes and objects in your Kotlin program. Kotlin supports both functional and object-oriented programming. Kotlin supports features such as higher-order functions, function types, and lambdas which represent Kotlin as a functional language. We will …

Kotlin Class and ObjectsRead More »

%d bloggers like this: