Question: What is the output of this code? interface A{ void firstMethod(): void secondMethod(); } class B implements A{ void firstMethod() { System.out.print(first); } } class

What is the output of this code? interface A{ void firstMethod(): void secondMethod(); } class B implements A{ void firstMethod() { System.out.print("first"); } } class C extends A{ void secondMethod() { System.out.print("second"); } } Bb = new BO: A a = new CO; a secondMethodo: b.firstMethod(); first second second first O Runtime Error Compilation Error
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
