Arun Chandravanshi

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 Arguments Read 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 Functions Read 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 Constructor Read 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 Objects Read More »

Java Constructors

In this article, you’ll learn about Java constructors, how to create and use constructors with the help of examples. Constructor A constructor is a member function of a class with the same name as its class and has no return type. A constructor for a class is a special method that is used to initialize

Java Constructors Read More »

Java Methods

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

Java Methods Read More »

Java 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 Java program. Java Objects Object refers to an entity that has state and behavior.  State: represents the data (properties) of an object. Behavior: represents the behavior (functionality) of an

Java Class and Objects Read More »

Java continue Statement

In this article, you will learn how to use continue construct and continue labels in Java. Sometimes it is useful to force an early iteration of a loop. That is, you might want to continue running the loop but stop processing the remaining code in its body for this particular iteration. In such case we

Java continue Statement Read More »

Kotlin continue

In this article, you will learn how to use continue construct and continue labels in Kotlin. Sometimes it is useful to force an early iteration of a loop. That is, you might want to continue running the loop but stop processing the remaining code in its body for this particular iteration. In such case we

Kotlin continue Read More »

Java break Statement

In this tutorial, you will learn to use break to terminate a loop. Also, you will learn about break labels. Java break example The break is a loop control statement which is used to terminate the loop. Basically break statements are used in the situations when we are not sure about the actual number of

Java break Statement Read More »