Category Archives: Kotlin

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 »

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 »

Loops in Kotlin

In this tutorial, we will learn about Loops in Kotlin. Loops are used to run a piece of code several times. For example, you want to show 1 to 100 numbers on screen it means you have to write println statement 100 times. But with the help of loop, you can do this by just writing println statement… Read More »

Comments in Kotlin

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

Input and Output in Kotlin

In this tutorial, we will learn about Input and Output in Kotlin. We have written several Kotlin programs in previous tutorials and in many programs we have displayed some output on the screen. We have two functions in Kotlin to show output on screen. print()  println() The only difference between is when we use print() method it prints… Read More »

Operators in Kotlin

In this tutorial, we will learn about Operators in Kotlin. Operators are special symbols in Kotlin and we use operators to perform some special operators on operands. For example, the addition of two variables. In kotlin operators are categorised in various categories. Types of Operators: Arithmetic operators Relational operators Assignment operators Unary operators Bitwise operations Logical operators Arithmetic… Read More »