Skip to content
Sharp

Object-oriented programming · interview question

What happens if a subclass in Java does not provide an implementation for an abstract method from its abstract superclass?

Multiple choiceMediumchapter-5-curatedpremiumoopinheritance-basics
Choose one answer
Answer and explanation

Correct answer

A. The subclass must be declared abstract.

Why

If a subclass does not implement all abstract methods from its superclass, it must also be declared abstract. Otherwise, the program will not compile.

Test yourself on Object-oriented programming

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

Start free test
All Object-oriented programming questions →