Java Constructor in Inheritance

In this article, you will learn about Constructor behavior in Inheritance, in Java with the help of examples. A Constructor is a member function of a class that allows you to initialize a newly created object of that class type with some initial value and has same name as class with no explicit return type. …

Java Constructor in InheritanceRead More »

Java Inheritance

In this tutorial, we will learn about inheritance in Java with the help of examples. Inheritance Java 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 (fields and methods) of another class.  Inheritance supports the concept …

Java 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 Infix Function Call

In this article, you will learn about infix notation to call a function in Kotlin with the help of examples. Kotlin supports function calls of a special kind, called infix calls. In Kotlin, functions marked with infix keyword can also be called using infix notation means calling without using parenthesis and dot. Before you learn …

Kotlin Infix Function CallRead More »

Kotlin Default and Named Arguments

In this article, you will learn about default and named arguments with the help of examples. Kotlin Default Argument In Kotlin, you can provide default values to parameters in the function definition and the parameter with a default value is called default argument. There are three cases for default arguments: Case I: All arguments passed …

Kotlin Default and Named ArgumentsRead More »

Kotlin Functions

In this article, you’ll learn about Kotlin functions, how to define a function and use them in your program with the help of examples. Functions A Kotlin function is a collection of statements that are grouped together to perform an operation. Functions allow us to reuse the code without retyping the code i.e. you can write …

Kotlin FunctionsRead 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: