public interface A{
default void decorateWithPaints(){
System.out.println("Decorate in A using paints");
}
}
public interface B{
default void decorateWithPaints(){
System.out.println("Decorate in B using paints");
}
}
public class C implements A,B{
@Override
public void decorateWithPaints() {
A.super.decorateWithPaints();
}
}
A.super.decorateWithPaints()
what does this actually means???
We know that we can access super class method using super
keyword . But in this case we have to give interface name to access default interface method. It is really confusing me.