Skip to content
Sharp

Object-oriented programming · interview question

Which of these features was introduced to interfaces in Java 9?

Multiple choiceEasychapter-5-curatedpremiumoopinterfaces
Choose one answer
Answer and explanation

Correct answer

B. Private methods

Why

Java 9 introduced private methods in interfaces, allowing code reuse within default and static methods. Private methods help reduce code duplication in interfaces.

Test yourself on Object-oriented programming

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

Start free test
All Object-oriented programming questions →