interface WithDefinitionsInter {
default void definedMeth() {
System.out.println("inside interface");
}
}
class WithDefinitionsImpl implements WithDefinitionsInter {
public void definedMeth() {
super.definedMeth(); // compilation error here
System.out.println("inside class");
}
}
public class QuizDef {
public static void main(String par[]) {
WithDefinitionsInter withDef = new WithDefinitionsImpl();
withDef.definedMeth();
}
}
Can someone please explain why I am not able to call default method of parent interface using super keyword.