67,512
社区成员
发帖
与我相关
我的任务
分享
public class Reluctant {
private Reluctant instance = new Reluctant();
public Reluctant() throws Exception {
throw new Exception("-->Reluctant Exception");
}
public static void main(String[] args) {
try {
Reluctant r = new Reluctant(); //调用构造方法之后,为啥初始化instance?
System.out.println("-->main");
} catch (Exception e) {
System.out.println("-->main Exception");
}
}
}