Skip to content
Sharp

Object-oriented programming · interview question

Which Java keyword would you use to declare an interface in Java?

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

Correct answer

B. Interface

Why

The keyword 'interface' is used to declare an interface in Java, which defines a contract that classes can implement.

Test yourself on Object-oriented programming

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

Start free test
All Object-oriented programming questions →