Answer:
No. You can use it to test for several possible classes, but only if you know what the possibilities are.
End of the Chapter
You have reached the end of the chapter. You may wish to review the following. Click on a blue subject that interests you to go to where it was discussed. To get back here, click on the "back arrow" button of your browser.
- The signature of a method.
- Overriding parent methods.
-
Using
superin a child method. - The root of a hierarchy.
- Arrays of related objects.
- The Object class.
- Using a type cast with a variable.
-
The
instanceofoperator.
The next chapter will discuss interfaces—yet another aspect
of Java you will need to know to do
graphical user interface programming.