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.1 Development Essentials – Kotlin Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.