Home / MCQ Bank / Computer
Computer Interfaces And Abstract Classes Difficulty: Medium

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(); } }

Select the correct option to test your answer:

More Computer Questions

Which of this access specifies can be used for a class so that its members can be accessed by a different class in the same package? Which among the following are the correct representation of "float(4,2)"? In balancing parentheses algorithm, the string is read from? Which key is between the Ctrl and Alt keys? The space left between the margin and the start of a paragraph is called ___________?