Skip to content
Sharp

Object-oriented programming · interview question

What happens if a subclass does not implement all abstract methods from its abstract superclass?

Multiple choiceEasychapter-5-curatedpremiumoopabstract-classes
Choose one answer
Answer and explanation

Correct answer

B. The subclass must be declared abstract.

Why

If a subclass does not implement all abstract methods from its abstract superclass, it must itself be declared abstract. Otherwise, it will result in a compilation error.

Test yourself on Object-oriented programming

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

Start free test
All Object-oriented programming questions →