Question: Predict the output of the below code. interface one void display ( ) ; interface Two : void display ( ) ; 3 public class
Predict the output of the below code.
interface one
void display;
interface Two :
void display;
public class Test implements one, Two
public static void mainString args
One obj new Test;
objdisplay;
Two obj new Test;
objdisplay;
@override
public void display
System.out.printlnDisplay;
Compilation error as display method of Two is not defined
Display Display
Runtime error as a single definition is provided for display of One and Two
No output
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
