Kotlin Training Program

DOWNLOAD APP

FEEDBACK

Control Flow

Normally a program is executed line by line in the order the code is written. Sometimes based on a certain condition, we may wan’t to break the usual flow. To do so, we have following constructs in Kotlin :

Let us understand each of these control flow statements one by one.

Conditional Statements

if-else statement

if-else-if & when statement

Loops

repeat statement

for Loop

while & do-while Loop

break & continue statements