Skip to content
Sharp

Object-oriented programming · interview question

Which Java feature allows different classes to share a method signature but provide different implementations?

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

Correct answer

D. Interfaces

Why

Interfaces in Java allow different classes to share a method signature but implement the method differently. This enables polymorphism, where the caller can interact with different implementations through a common interface.

Test yourself on Object-oriented programming

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

Start free test
All Object-oriented programming questions →