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 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. It… Read More »

Comments in Java

In this tutorial, we will learn about Comments in Java. Comments are not used to perform any function in the program but they are really useful for developers. Developers can write comments with variables and Methods to remember their working (purpose) in the program. One important thing to mention comments doesn’t put any impact on the execution of… Read More »

String in Java

In this tutorial, we will learn about String in Java. Some students think String is a primitive data type like int or char but In java String is a very smart and immutable class which is part of java.lang package. When we right a char sequence it represents the object of String class. Check the following example to… 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. Here is the syntax to define a… Read More »

Jump expressions in Kotlin

In this tutorial, we will learn about Jump expressions in Kotlin. The main use of all these three jump expressions is to move the cursor on the different statement in code. There are a total of three jump expressions available in Kotlin. break continue return Break expression: The break expression is used to terminates the nearest enclosing loop.… Read More »

Throw keyword in Java

In this tutorial, we will learn about throw keyword in Java. The throw keyword in java is used to throw an exception explicitly. We can throw both kinds of checked and unchecked exceptions using this throw keyword. But we mainly use throw keyword to throw custom exceptions(also known as the user-defined exceptions). Check out the following syntax of… Read More »

Throws keyword in Java

In this tutorial, we will learn throws keyword in Java. There are many time when compiler finds some suspicious code that might throw a checked exception and warn programmers to solve exceptions. If programmer will not handle this kind of exceptions then the compiler will throw an error while compiling unreported exception XXX must be caught or declared… Read More »

Try Catch Block

In this tutorial, we will learn about Try Catch Block in Java. Using Try Catch block is the best way to handle exceptions in Java. We keep all the code that might throw an exception in the try block. The try block is followed by the catch and finally blocks. In this catch and finally blocks, we write… Read More »