The toString method is overridden
(See Listing 6 and Listing
9.)
The toString method is overridden
- in exactly the same way
- in both the Prob05MyClassB class and the
Prob05MyClassB class.
Therefore, when the toString method is called on an object
of either class,
- it will return a string representation of
- the value stored in the variable named data plus
5.