Java - Interfaces
Identify the error in the following code snippet:
What should be done inside class Z's
interface X {
default void display() {
System.out.println("X display");
}
}
interface Y {
default void display() {
System.out.println("Y display");
}
}
class Z implements X, Y {
public void display() {
// ???
}
}What should be done inside class Z's
display() method to fix the error?