Chapter 5. Factories
This chapter will introduce you to the concept of types. A data type, or simply a type, is a classification of data. The type defines the operations that can be done on the data and the various attributes it might have. A sentence or a word can be considered as being a String
. A number (non-decimal) can be considered to be an Int
type. We will cover what exactly String
and Int
are along with how to create our own instances of String
and Int
. An instance is the actual number or the actual word we're referring to.
In this chapter, we will cover the following topics:
- Creating an instance of a
String
,Int
, andDouble
- Having a clear understanding as to what a type is
String and Int
There are only a few things on this Earth that are ...
Get Swift iOS Programming for Kids 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.