🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Inheritance: all 10 questions

Quiz: Inheritance · Question 9 of 10

In Java, two interfaces both provide a default method start(), and a class implements both. What must the class do?

In Java, two interfaces both provide a default method start(), and a class implements both. What must the class do?

  1. A.Override start() itself to resolve the conflict
  2. B.Nothing; the first interface wins
  3. C.Nothing; the second interface wins
  4. D.It cannot implement both interfaces
Answer & explanation

Correct answer: Override start() itself to resolve the conflict

Java forces you to settle the diamond ambiguity explicitly.

Can you get the rest right without peeking?

Take the timed Quiz: Inheritance quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →