package debug;
public class Test {
static int x = 0;
static String s = "123";
static {
String s1 = "456";
if(1==1)
throw new RuntimeException();
}
public static void main(String[] args) {
new Test();
}
}
To compile it and run it.
java.lang.ExceptionInInitializerError Caused by: java.lang.RuntimeException
at debug.Test.<clinit>(Test.java:8)
Exception in thread "main"
January 15th Thursday 2009 (一月 十五日 木曜日)
最新推荐文章于 2022-03-23 22:45:20 发布