Skip to content
Sharp

Object-oriented programming · interview question

Why does an abstract class in achieving polymorphism matter in this design?

Multiple choiceMediumchapter-5-curatedpremiumooppolymorphism
Choose one answer
Answer and explanation

Correct answer

D. To provide default behavior that can be overridden by subclasses

Why

An abstract class in Java provides default behavior that can be overridden by subclasses. This allows subclasses to inherit common behavior while providing specific implementations, facilitating polymorphism.

Test yourself on Object-oriented programming

A free test with instant, explained results. No account needed.

Start free test
All Object-oriented programming questions →