Question OOP-INH-0069
HardA Java class implements two interfaces that both provide a default method hello(). What must it do?
- A.
Make hello() static
- B.
Nothing; Java picks one
- 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
Inheritance question
A Java class implements two interfaces that both provide a default method hello(). What must it do?
Make hello() static
Nothing; Java picks one
Sign up free to see the answer and a step-by-step explanation.
Override hello(), optionally calling A.super.hello() or B.super.hello()
Rename one interface