Kotlin 简明教程

Kotlin - Control Flow

Kotlin流控制语句确定要执行的下一条语句。例如,语句 if-else, if, when, while, fordo 是流控制语句。

Kotlin flow control statements determine the next statement to be executed. For example, the statements if-else, if, when, while, for, and do are flow control statements.

Flow Chart for Control Flow

控制流可以利用以下流程图描述:

Control flow can be depicted using the following Flow Chart:

control flow chart

Kotlin Control Flow Statements

本教程将逐一介绍所有这些语句,并说明其用法和合适的示例。

This tutorial will take you through all these statements one by one explaining their usage and suitable examples.