Self-Review Exercises

10.1Fill in the blanks in each of the following statements:
  1. Polymorphism helps eliminate _____ logic.

  2. If a class contains at least one abstract method, it is a(n) _____ class.

  3. Classes from which objects can be instantiated are called _____ classes.

  4. _____ involves using a superclass variable to invoke methods on superclass and subclass objects, enabling you to “program in the general.”

  5. Methods that are not interface methods and that do not provide implementations must be declared using keyword _____.

  6. Casting a reference stored in a superclass variable to a subclass type is called _____.

10.2State whether each of the statements that follows is true or false. If false, explain why.
  1. It is possible to treat superclass objects and ...

Get Java™ How to Program, Seventh Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.