Skip to content
Sharp

Core Java · interview question

Why might a class choose to explicitly invoke a default method from one of its interfaces?

Multiple choiceHardchapter-5-curatedpremiumcore-javadefault-methods-and-multiple-inheritance
Choose one answer
Answer and explanation

Correct answer

C. To use an existing behavior without reimplementing it.

Why

A class might choose to invoke a default method explicitly to reuse the behavior that is already defined in the interface, thereby avoiding code duplication and leveraging polymorphism.

Test yourself on Core Java

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

Start free test
All Core Java questions →