Kotlin function

Functions are blocks of code that perform a specific task and can be called multiple times within a program. By using functions, we can avoid repeating the same code, which…

0 Comments

Kotlin Array

What is Array in kotlin? Array is a collection of similar data types such as an Int, String etc. It is used to organize data so sorted and searched can be…

0 Comments

Kotlin Return and jump

These are the jump expression are used to control the flow of program execution. return break continue return : By default returns from the nearest enclosing function or anonymous function…

Comments Off on Kotlin Return and jump

Kotlin do-while loop

do-while loop first executes the code of do block then it checks the condition. do-while loop executes at least once even the condition of while is false. Syntax do{ //block of…

Comments Off on Kotlin do-while loop

Kotlin while Loop

It is used to iterate a part of code several times. It executes until the condition is true. Syntax while(condition){ //this code executes } let's take an example: fun main(args:…

Comments Off on Kotlin while Loop

Kotlin for Loop

It is used to iterate a part of code several times. it iterate through array, collection(like list, map), ranges, String. If body of for loop have only single statement we…

Comments Off on Kotlin for Loop

Kotlin when Expression

when is the replacement of the switch operator of java. Block of code will executed when some condition is satisfied, also when expression can returns value using braces we can…

Comments Off on Kotlin when Expression

Kotlin Control Flow

Kotlin Control Flow Statements It is used to control the flow of program structure, following types of expression in kotlin. if Expression if-else expression if-else if-else ladder expression nested if…

Comments Off on Kotlin Control Flow

Kotlin Operator

Operators are symbols that perform mathematical or logical operations. It used to perform operations on values and variables. Types of Operators in Kotlin  Arithmetic operator Relation operator Assignment operator Unary operator…

Comments Off on Kotlin Operator

Kotlin Input Output

Kotlin input output operations performed to flow sequence of bytes or byte streams from input device like keyboard to main memory  and from the main memory to output device like…

Comments Off on Kotlin Input Output