public interface Test4 {
default void test1(){
System.out.println("tes1");
};
default void aa(){
System.out.println("aa");
};
}
public static void main(String[] args) {
Test4 test4=new Test4(){};
test4.aa();
test4.test1();
}
这个实现要用1.8的jdk!