Up until chapter 5 we haven’t defined or used a lot of interactions between the objects we’ve created and we’ve only created a handful of objects in our examples.
This of course has been helpful to introduce the concepts we’ve covered so far.
However, in most projects you’ll encounter, you’ll be handling more than a few objects and objects will interact with each other in different ways.
It is also important to understand some behaviors that the JVM and the Java libraries use/expect us to provide, and to understand some behaviors provided by the compiler for classes that come from the Java library.
In this chapter we cover these base object interactions and behaviors, including:
Object casting and type comparison
Object equality and hash codes
Object String representation
Introduction to garbage collection
Comparing objects (less than, equals or greater than)
Primitive Wrapper types and Autoboxing
Chapter 7 will introduce data structures that allow us to handle collections of objects for our applications.