14. Kotlin Flow Control

Regardless of the programming language used, application development is largely an exercise in applying logic, and much of the art of programming involves writing code that makes decisions based on one or more criteria. Such decisions define which code gets executed, how many times it is executed and, conversely, which code gets by-passed when the program is executing. This is often referred to as flow control since it controls the flow of program execution. Flow control typically falls into the categories of looping control (how often code is executed) and conditional flow control (whether or not code is executed). This chapter is intended to provide an introductory overview of both types of flow control in Kotlin.

Get Android Studio 3.6 Development Essentials - Kotlin Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.