Skip to content
Sharp

Object-oriented programming · interview question

How does Java achieve polymorphism with interfaces?

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

Correct answer

B. By enabling objects to be referenced by their interface type

Why

Java achieves polymorphism with interfaces by allowing objects to be referenced by their interface type. This means any class implementing the interface can be treated as an instance of the interface, promoting flexibility and decoupled interactions.

Test yourself on Object-oriented programming

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

Start free test
All Object-oriented programming questions →