I have a Query Suppose I have a 2 interface f1 and f2 and f2 interface extends f1 interface. both interface have default method m1 with some implementation. now we have a class c1 which implements f2 interface and we override m1() method. now i can access f2 default method. f2.super.m1(). how can i access f1 interface default method. Please clarify me is it possible or not?
interface f1{
public default void m1() {
System.out.println("f1");
};
}
interface f2 extends f1{
public default void m1(){
System.out.println("f2");
};
}
public class techgig implements f2 {
public static void main(String[] args) {
techgig a = new techgig();
a.m1();
}
@Override
public void m1() {
// TODO Auto-generated method stub
f2.super.m1();
}
}
It will print f2 but i want to print f1