Question OOP-ABS-0017
HardA class implements two interfaces that both define the same default method. What must it do?
- A.
Nothing, Java picks the first
- B.
Make the method static
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Abstraction and Interfaces question
A class implements two interfaces that both define the same default method. What must it do?
Nothing, Java picks the first
Make the method static
Sign up free to see the answer and a step-by-step explanation.
Override the method itself (it may call either version with Interface.super.method())
It can't compile under any circumstances