Control flow elements

In Kotlin, control flow elements are expressions. This is different from Java, in which they are statements. Statements just specify the flow of a program, and don't return any values. This section will cover the following control flow elements:

  • The if { ... } else { ... } expression
  • The when { ... } expression
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.189.189.67