2 Variables, Constants, and Types

This chapter will introduce you to variables, constants, and Kotlin’s basic data types – fundamental elements of any program. You use variables and constants to store values and pass data around in your application. Types describe the particular kind of data that is held by a constant or variable.

There are important differences between each of the data types and between variables and constants that shape how they are used.

Get Kotlin Programming: The Big Nerd Ranch Guide, 2nd 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.