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();
3
public class Test implements one, Two {
public static void main(String[] args)
One obj1= new Test();
obj1.display();
Two obj2= new Test();
obj2.display();
3
@override
public void display(){
System.out.println("Display");
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
Predict the output of the below code. interface

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!