Skip to content
Sharp

Core Java · interview question

What is one main purpose of using interfaces in Java?

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

Correct answer

D. To allow multiple inheritance of type.

Why

Interfaces allow a class to inherit from multiple types, which facilitates multiple inheritance of type, thus enabling polymorphic behavior without the complexity of multiple inheritance of implementation.

Test yourself on Core Java

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

Start free test
All Core Java questions →