Kotlin

Creating Classes in Kotlin

In this article, I will explain how to create Classes in Kotlin. Like other programming languages, the class keyword is used to define a class in Kotlin. Moreover, classes in Kotlin can have properties, methods, and constructors as its members. The following code shows the syntax of creating classes in Kotlin. Unlike Java, it is not mandatory to have …

Java

Interfaces in Java

Interfaces in Java provide us a way to declare the functionality that can be implemented by different classes in their own way. In general, an interface represents a contract. Basically, it is a contract between different groups of people in the software industry where the groups want to agree on how the software should behave. Therefore, the …

Java

Creating Arrays in Java

In this article, I will explain Creating Arrays in Java. To begin with, let us first understand what an array is. Basically, an array represents a collection of elements. So, an array can contain multiple values of the same data type. Additionally, all elements in an array occupy the contiguous locations in memory. Further, all …

Java

Method Overloading Using Java

This article demonstrates Method-Overloading Using Java. Earlier, I have explained how to create user-defined methods. Accordingly, a class can have user-defined methods which are all uniquely named. In other words, in a particular class, each method has a unique name. However, this rule has an exception. In other words, a class may allow two or more methods …