Self-Review Exercises
10.1 Fill in the blanks in each of the following statements:
a) If a class contains at least one abstract method, it’s a(n) ________ class.
b) Classes from which objects can be instantiated are called ________ classes.
c) ________ involves using a superclass variable to invoke methods on superclass and sub-class objects, enabling you to “program in the general.”
d) Methods that are not interface methods and that do not provide implementations must be declared using keyword _______.
e) Casting a reference stored in a superclass variable to a subclass type is called _______.
10.2 State whether each of the statements that follows is true or false. If false, explain why.
a) All methods in an abstract class must be declared ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access