In the examples in Chapter 1, you saw casual use of data types to help you understand Java class structure. Now we dig in a bit deeper to understand the two basic types of data we have in Java, objects and primitives. As you learn about them, you’ll get a better understanding of the rules that support them and the cases the drive their use.
We’ll also take our first look at two key Java classes, String and StringBuilder, which you’ll need quite frequently in everyday programming.
In this chapter, we’ll cover the following topics: