String in Kotlin

In this tutorial, we will learn about String in Kotlin. A string is an array of characters(char type values) and String class is used to represent strings in Kotlin. It is important to note just like Java, String is an immutable class in Kotlin it means we can not change of object once after creation. Creating a String

String in Kotlin Read More »

Ranges in Kotlin

In this tutorial, we will learn about Ranges in Kotlin. This is a very amazing feature provided by Kotlin with the help of ranges we can create a collection of values by just defining starting and ending value. For example, you want to create a series of 1 to 10 this can be easily done with

Ranges in Kotlin Read More »

Array in Kotlin

In this tutorial, we will learn about Array in Kotlin. The array is also known as a collection of homogeneous data elements. In arrays, we can store multiple values in contiguous memory locations. Furthermore, we store and fetch data with the help of index numbers. It is important to note, In kotlin array is not a data type.

Array in Kotlin Read More »

Function Overloading in Kotlin

In this tutorial, we will learn about the Function overloading in Kotlin. Same as Java Methods we can overload function in Kotlin. To overload a function in Kotlin, the function must have the same name and parameter lists should be different(in data type or in numbers). Check out the following example program. Example Program: //overloaded function fun addition(num1:

Function Overloading in Kotlin Read More »

Function in Kotlin

In this tutorial, we will learn about Function in Kotlin.  A function is a small piece(block) of code which can perform some special task and it only executes when we call this function. The function allows us to reuse code. In Kotlin we use the fun keyword to declare a function. fun functionName(parameterName: parameterType, parameterName: parameterType): returnType { //body

Function in Kotlin Read More »

Thread class methods

In this tutorial, we will learn about Thread class methods. In the last tutorial, we already saw two thread class methods run() and start() method. There are a lot of other methods in Thread class. Check this following list. Method Description public void start() This method is used to start the execution of the thread. public

Thread class methods Read More »

Thread in Java

In this tutorial, we will learn ways to create a Thread in Java. A Thread is a lightweight process and Java has a feature called multithreading which means we can run multiple threads simultaneously. There are two ways to create the thread in Java first one is by extending Thread class and the second one is by implementing

Thread in Java Read More »

Multi-Threading in Java

In this tutorial, we will learn about Multi-Threading in Java. In java we can run more than one threads(a piece of code) simultaneously at the same time with the help of Multithreading and each piece code can perform a different task. Here thread means a lightweight process which can perform some task in the program. It

Multi-Threading in Java Read More »

Custom Exception in Java

In this tutorial, we will learn about Custom Exception in Java. Custom Exceptions are also known as a user-defined exception. The main motive of creating a custom exception is to create a new exception according to project requirement. When you create a custom exception you have to inherit Exception class as a parent in your custom

Custom Exception in Java Read More »

×