Kotlin Basics

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. …

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 …

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 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 …

Array 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. Here is the syntax …

Function in Kotlin 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 …

Comments in Kotlin 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 …

Operators in Kotlin Read More »

Type Conversion in Kotlin

In this tutorial, we will learn about Type Conversion in Kotlin. In simple words type conversion means converting variable of one data type into another data type. It is important to note in Kotlin doesn’t support implicit conversion of smaller data type into larger data type. Invalid Type Conversion Example: Kotlin also supports explicit type …

Type Conversion in Kotlin Read More »

Data Types in Kotlin

In this tutorial, we will learn about available Data Types in Kotlin. Data Types are used to refer to the type and size of the value in a variable. The data types in Kotlin are divided into various categories and these categories are as follow: Number Character Boolean Array String Number: This category contains all …

Data Types in Kotlin Read More »