Answers to Self-Review Exercises (Sections G.6G.13)

  1. G.3

    1. abstract.

    2. concrete.

    3. Polymorphism.

    4. abstract.

    5. downcasting.

  2. G.4

    1. False. An abstract class can include methods with implementations and abstract methods.

    2. False. Trying to invoke a subclass-only method with a superclass variable is not allowed.

    3. False. Only a concrete subclass must implement the method.

    4. True.

Get Android How to Program, 3/e 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.