Java - AbstractionWhat 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.Check Answer
Step-by-Step SolutionSolution:Step 1: Understand subclass obligationsA subclass must provide implementations for all abstract methods or be declared abstract itself.Step 2: Evaluate other optionsIgnoring or partially implementing abstract methods causes errors, so B, C, and D are incorrect.Final Answer:Implement all abstract methods or be declared abstract itself. -> Option DQuick 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 methodsIgnoring abstract methods in subclassTrying to call abstract methods without implementation
Master "Abstraction" in Java9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More Java Quizzes Abstraction - Why abstraction is required - Quiz 6medium Constructors - Parameterized constructor - Quiz 3easy Constructors - Parameterized constructor - Quiz 12easy Custom Exceptions - Throwing custom exceptions - Quiz 1easy Exception Handling - Checked vs unchecked exceptions - Quiz 3easy Inheritance - Method overriding - Quiz 2easy Inheritance - Why inheritance is used - Quiz 8hard Object-Oriented Programming Concepts - Classes and objects - Quiz 15hard Polymorphism - Why polymorphism is needed - Quiz 3easy Polymorphism - Method overriding rules - Quiz 15hard