
It’s important to understand that an object reference and the object data
are different: The object reference represents the memory location, and the
object data are the data stored at that memory location. Notice in Figure
3.1 that the object references, independenceDay, graduationDate, and
defaultDate, point to the locations of the object data.
3.3 Calling Methods
Once an object is instantiated, we can use the object by calling its methods.
As we mentioned earlier, the authors of classes publish their API so that their
clients know what methods are available and how to call those methods.
Figure 3.2 illustrates how calling a class method alters the ...