I have below 2 interfaces.
public interface I1 {
public void show();
}
Another one
public interface I2 {
public void show();
}
We have a class which is implementing both.
public class Main implements I1,I2 {
@Override
public void show() {
System.out.println("Hello I am mahima");
}
I ran the program , there is no compilation or run time error. How can I find which interface method is getting called here? Is there anyway to find it?
This question was asked in an Amazon interview first round.