Skip to content
Sharp

Object-oriented programming · interview question

Why might a developer choose to use an interface over an abstract class in Java?

Multiple choiceHardchapter-5-curatedpremiumoopinterfaces
Choose one answer
Answer and explanation

Correct answer

D. To allow a class to implement multiple interfaces

Why

A developer might choose interfaces over abstract classes to allow a class to implement multiple interfaces, as Java doesn't support multiple inheritance with classes but does with interfaces.

Test yourself on Object-oriented programming

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

Start free test
All Object-oriented programming questions →