Variables
We can think of a variable as a named storage box. We choose a name, perhaps variableA. These names are the programmer's access into the memory of the user's Android device.
Variables are values in memory that are ready to be used when necessary by referring to them with their name.
Computer memory has a highly complex system of addresses that, fortunately, we do not need to directly interact with. Kotlin variables allow us to devise our own convenient names for all the data that we need our app to work with. The operating system will, in turn, interact with the physical (hardware) memory.
So, we can think of our Android device's memory as a huge warehouse waiting for us to add our variables. When we assign names to our variables, they ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access