Q36
What will be the output? interface A public void method1(); class One implements A public void method1() System.out.println("Class One method1"); class Two extends One public void method1() System.out.println("Class Two method1"); public class Test extends Two public static void main(String[] args) A a = new Two(); a.method1();
A.
Compilation Error
B.
Class One method1
C.
Class Two method1
AnswerD.
Throws a NoSuchMethodException at runtime.
E.
None of these
Answer: Option C
Solution
Answer: Option C
No explanation is given for this question Let's Discuss on Board