Skip to content
Sharp

Object-oriented programming · interview question

Why do teams use interfaces in Java over abstract classes in production code?

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

Correct answer

B. Interfaces allow multiple inheritance of type.

Why

Java interfaces allow a class to inherit from multiple types, which is not possible with classes and abstract classes. This facilitates polymorphism and loose coupling.

Test yourself on Object-oriented programming

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

Start free test
All Object-oriented programming questions →