Bird
0
0

What must a subclass do if it extends an abstract class with abstract methods?

easy📝 Conceptual Q2 of 15
Java - Abstraction
What must a subclass do if it extends an abstract class with abstract methods?
ACall the abstract methods directly without implementation.
BOverride only one abstract method.
CIgnore abstract methods; no implementation needed.
DImplement all abstract methods or be declared abstract itself.
Step-by-Step Solution
Solution:
  1. Step 1: Understand subclass obligations

    A subclass must provide implementations for all abstract methods or be declared abstract itself.
  2. Step 2: Evaluate other options

    Ignoring or partially implementing abstract methods causes errors, so B, C, and D are incorrect.
  3. Final Answer:

    Implement all abstract methods or be declared abstract itself. -> Option D
  4. Quick Check:

    Subclass abstract method implementation = A [OK]
Quick Trick: Subclasses must implement all abstract methods or be abstract [OK]
Common Mistakes:
  • Implementing only some abstract methods
  • Ignoring abstract methods in subclass
  • Trying to call abstract methods without implementation

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Java Quizzes