Oracle
1Z0-851 · Question #91
Given: 11. public interface A111 { 12. String s = "yo"; 13. public void method1(); 14. } 17. interface B { } 20. interface C extends A111, B { 21. public void method1(); 22. public void method1(int…
The correct answer is A. Compilation succeeds. See the full explanation below for the reasoning.
Question
Given: 11. public interface A111 { 12. String s = "yo"; 13. public void method1(); 14. } 17. interface B { } 20. interface C extends A111, B { 21. public void method1(); 22. public void method1(int x); 23. } What is the result?
Options
- ACompilation succeeds.
- BCompilation fails due to multiple errors.
- CCompilation fails due to an error only on line 20.
- DCompilation fails due to an error only on line 21.
- ECompilation fails due to an error only on line 22.
- FCompilation fails due to an error only on line 12.
How the community answered
(46 responses)- A72% (33)
- C7% (3)
- D15% (7)
- E4% (2)
- F2% (1)
Community Discussion
No community discussion yet for this question.