Java - Interfaces
What will be the output of the following code?
interface I {
default void print() {
System.out.println("Interface I");
}
}
class A implements I {
public void print() {
System.out.println("Class A");
}
}
public class Test {
public static void main(String[] args) {
I obj = new A();
obj.print();
}
}