这一页的Java程序代码代表一份完整的程序。你的任务是要扮演编译器角色并判断程序输出会是哪一个?
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.random() * 6);
System.out.println("static block" + rand);
}
StaticTests() {
System.out.println("constructor");
}
public static void main(String [] args) {
System.out.println("in main");
StaticTest st = new StaticTests();
}
} 哪个才是它的输出?