A good answer might be:
|
the Object classThis sort of activity is very common in programming. You will see it a lot in the future. Notice that no new objects were created; but diferent reference variables were used for already-existing objects. In Java, there is a pre-defined class that is the ultimate ancestor of all other classes. This class is called Object. When you define a class of your own like this:
You are actually defining a child of the Object class.
The following is the exact equivalent of the above:
Every class in Java---your own and every class in every library---descends
from Object.
This will be important to remember when you get to graphical user interfaces.
|
QUESTION 15:
|