Introduction

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Heads up... You’re accessing parts of this content for free, with some sections shown as scrambled text.

Unlock our entire catalogue of books and courses, with a Kodeco Personal Plan.

Unlock now

In the last lesson, you learned about operators and how you can use them to perform arithmetic, logical, and relational operations in your program. This lesson will teach you how to make decisions in your Kotlin programs using control flow.

Control flow refers to the order of execution of statements in a program. It determines how a program progresses from one instruction to another based on certain conditions. In other words, as the name suggests, it controls the flow of the program.

Understanding control flow is crucial for building clean, reusable, and dynamic programs capable of reacting to different scenarios. You have to consider readability and maintainability apart from the specific requirements of your application while considering the control flow structure.

Kotlin allows you to use control flow statements as an expression, which will also be explained in this lesson.

See forum comments
Download course materials from Github
Previous: Quiz: Using Operators Next: Instruction