What is the result?

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?

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?

A.
Compilation succeeds.

B.
Compilation fails due to multiple errors.

C.
Compilation fails due to an error only on line 20.

D.
Compilation fails due to an error only on line 21.

E.
Compilation fails due to an error only on line 22.

F.
Compilation fails due to an error only on line 12.



Leave a Reply 0

Your email address will not be published. Required fields are marked *