class StaticSuper{
static{
System.out.println("super static block");
}
StaticSuper{
System.out.println("super constructor");
}
}
public class StaticTests extends StaticSuper{
static int rand;
static{
rand = (int) (Math.ranom() * 6);
System.out.println("static block"+rand);
}
StaticTests{
System.out.println("constructor");
}
public static void main(string[] args){
System.out.println("int main");
StaticTests st = new StaticTests();
}
}
非法类型开始与标识符
- 写回答
- 好问题 0 提建议
- 关注问题
- 邀请回答
-


