12. Kotlin Data Types,Variables and Nullability

Both this and the following few chapters are intended to introduce the basics of the Kotlin programming language. This chapter will focus on the various data types available for use within Kotlin code. This will also include an explanation of constants, variables, type casting and Kotlin’s handling of null values.

As outlined in the previous chapter, entitled “An Introduction to Kotlin” a useful way to experiment with the language is to use the Kotlin online playground environment. Before starting this chapter, therefore, open a browser window, navigate to https://play.kotlinlang.org and use the playground to try out the code in both this and the other Kotlin introductory chapters that follow. ...

Get Android Studio 4.2 Development Essentials - Kotlin Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.