package com.banji.xy;
public interface AA {
int STATUS = 100;
public abstract void display();
}
package com.banji.xy;
public interface BB {
public abstract void show();
public default void print() {
System.out.print("这是接口BB的默认方法");
}
}
package com.banji.xy;
public interface CC extends AA,BB{
int NUM = 3;
}
package com.banji.xy;
public class DD implements CC {
public void display() {
System.out.println("接口AA的display方法");
}
public void show() {
System.out.println("接口BB的show方法");
}
public static void main(String[] args) {
DD dd = new DD();
System.out.println(DD.STATUS);
dd.show();
dd.print();
AA aa = new DD();
aa.display();
}
}