Java Lambda default 默认方法(三)
public interface AAA {
default void say() {
System.out.println("wfsb AAA.");
}
}
public interface BBB extends AAA {
default void say() {
System.out.println("wfsb BBB.");
}
}
public class DDD implements AAA {
public void say() {
System.out.println("wfsb DDD.");
}
}
public class FFF extends DDD implements BBB, AAA{
public static void main(String[] args) {
FFF fff = new FFF();
fff.say();
}
}
wfsb DDD.
____________________________________________________________________________________________________________
____________________________________________________________________________________________________________
____________________________________________________________________________________________________________
|