Skip to content
Sharp

Core Java · interview question

In what scenario can a default method in an interface be overridden?

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

Correct answer

D. When the implementing class provides its own implementation.

Why

A default method can be overridden in an implementing class by providing a new implementation, similar to how methods in a class can be overridden.

Test yourself on Core Java

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

Start free test
All Core Java questions →