-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Android Development with Kotlin
By :

In this chapter, we have discussed the differences between variables, values, and consts, and discussed basic Kotlin data types, including ranges. We also looked into a Kotlin type system that enforces strict null safety and ways to deal with nullable references using various operators and smart casts. We now know that we can write more concise code by taking advantage of using type inference and various control structures that in Kotlin are treated as expressions. Finally, we discussed ways of exception handling.
In the next chapter, we will learn about functions and present different ways of defining them. We will cover concepts such as single-expression functions, default arguments and named argument syntax, and discuss various modifiers.