Sail E0 Webinar
Question
What will be the output?interface A{public void method();}class One{public void method(){System.out.println("Class One method");}}class Two extends One implements A{public void method(){System.out.println("Class Two method");}}public class Test extends Two{public static void main(String[] args){A a = new Two();a.method();}}
Options:
A .  will print Class One method
B .  compiles fine but print nothing
C .  None of these
D .  will print Class Two method
E .  Compilation Error
Answer: Option D

Submit Your Solution Below and Earn Points !
Next Question

Submit Solution

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

More Questions on This Topic :


Latest Videos

Latest Test Papers