In java 8, got two interfaces with same name method.
First method don't have body
interface Interface01 {
void method();
}
and other have default body
interface Interface02 {
default void method() {
System.out.println("This is from: Interface02 - method()");
}
}
How to call second method() in first @overriden method(). Is it possible?
class ChildClass implements Interface01, Interface02 {
public void method() { //override method from Interface01
method(); // calling method from Interface02
}
}
Is this possible, reference to interface02.method()?