public interface InterfaceA {
default void hello(){
System.out.println("Hello from A");
}
}
public interface InterfaceB extends InterfaceA{
default void hello(){
System.out.println("Hello from B");
}
}
public class ClassC implements InterfaceA,InterfaceB{
public static void main(String[] args) {
new ClassC().hello();
}
}
public class ClassC implements InterfaceA,InterfaceB{
public static void main(String[] args) {
new ClassC().hello();
}
}
result:Hello from B