Skip to content
Sharp

Object-oriented programming · interview question

Given the following code, which statement is true about the class OnlineOrder?

Multiple choiceMediumchapter-5-curatedpremiumoopinterfaces
java
class OnlineOrder extends Order {}
Choose one answer
Answer and explanation

Correct answer

D. OnlineOrder can implement multiple interfaces.

Why

In Java, a class can implement multiple interfaces. This allows OnlineOrder to provide specific implementations for methods defined in various interfaces, supporting multiple capabilities.

Test yourself on Object-oriented programming

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

Start free test
All Object-oriented programming questions →