-
Book Overview & Buying
-
Table Of Contents
Android Programming for Beginners - Fourth Edition
By :
In the previous chapter, we covered the mathematical operators available to us in Kotlin. In this chapter, we will look at more types of operators. Specifically, we will cover conditional operators. For example, == which allows us to test whether two values are equal, and logical operators like || which allow us to create conditions where multiple different results can cause our code to flow in a particular direction. It won't be complicated because we will discuss them one at a time with real examples.
As a part of using these operators, we will see how all these examples work with the if and else keywords to give us full control over the flow of our code.
As a heads-up to what is coming later in the book, if, else, and expressions are just the start of the many expressive ways we can control our Android apps using Kotlin. In fact, the next two chapters will cover the when keyword and the topic of ranges, iteration (Looping...