Skip to content
Sharp

Core Java · interview question

In the context of Java interfaces, what is a default method?

Multiple choiceMediumchapter-5-curatedpremiumcore-javacode-reading-with-related-types
Choose one answer
Answer and explanation

Correct answer

A. A method with a default implementation in the interface.

Why

A default method in an interface provides a method with a default implementation, which allows the implementing class to inherit this method without necessarily overriding it.

Test yourself on Core Java

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

Start free test
All Core Java questions →