public class Reluctant { private Reluctant internalInstance = new Reluctant();
public Reluctant() throws Exception {
throw new Exception("I'm not coming out");
}
public static void main(String[] args) {
try {
Reluctant b = new Reluctant();
System.out.println("Surprise!");
} catch (Exception ex) {
System.out.println("I told you so");
}
}
}
public Reluctant() throws Exception {
throw new Exception("I'm not coming out");
}
public static void main(String[] args) {
try {
Reluctant b = new Reluctant();
System.out.println("Surprise!");
} catch (Exception ex) {
System.out.println("I told you so");
}
}
}
解决方案 »
- 脚本控制播放音频
- Struts的这两个标签有什么不同呢?
- 求助JEditorPane显示含有css的html
- 如何使用log4j把日志记录到一个动态的根据时间生成的一个文件名的文件中!
- 指点一二
- JScrollPane中的scrollbar的位置可以改变吗?如何改变?
- 关于PACKAGE 和 IMPORT的问题,小问题,请教请教!
- 高分请教,怎样开发swing控件?paint和paintComponent有什么区别?
- java实参的变量命名应该用什么参数阿?
- 谁有weblogic6.1的crack,或者6.0得,谢谢了
- 有谁给我解释一下面向对象的概念
- jacob 画word表格怎么做,大虾指点
public Reluctant() throws Exception {
throw new Exception("I'm not coming out");
}
public static void main(String[] args) {
try {
Reluctant b = new Reluctant();
System.out.println("Surprise!");
} catch (Exception ex) {
System.out.println("I told you so");
}
}
}
public class Reluctant { private static Reluctant internalInstance = new Reluctant(); // 使用static定义类变量
public Reluctant() throws Exception {
throw new Exception("I'm not coming out");
}
public static void main(String[] args) {
try {
Reluctant b = new Reluctant();
System.out.println("Surprise!");
} catch (Exception ex) {
System.out.println("I told you so");
}
}
}