public class MyTest5 {
public static void main(String[] args) {
System.out.println(MyChild5.c);
}
}
interface MyParent5{
/*接口里的成员都是默认 pulic static final*/
public static final int a = 5;
Thread thrad = new Thread(){
{
System.out.println("MyParent5");
}
};
}
interface MyChild5 extends MyParent5{
Thread thrad = new Thread(){
{
System.out.println("MyChild5");
}
};
int b = 6;
int c = new Random().nextInt(3);
}
原文:https://www.cnblogs.com/boychen/p/11674854.html