Chapter 2. Data types, variables, and constants
This chapter covers
Virtually every application needs to store, represent, or process data of some kind, whether a list of calendar appointments, the current weather conditions in New York, or the high scores of a game.
Because Objective-C is a statically typed language, whenever you declare a variable, you must also specify the type of data you expect to store in it. As an example, the following variable declaration declares a variable named zombieCount, which is of type int:
Short for integer, int is a data type capable of storing a whole number between −2,147,483,648 and +2,147,483,647. In this chapter, you’ll discover many data types that can be used to store a wide range of real-world values. But before we dive in too far, let’s introduce the Rental Manager application that we build over the course of this book.