初学者请教java中异常处理的问题!谢谢
mxswl 2007-04-29 04:22:50 1.在什么时候要使用throws子句来声明异常? 如一个方法里:
public void myfunc() throws xxxxxx{
throw new xxxxxx;
}
这里为什么要在方法后面用throws 子句呢?什么时候这样用呢?
2.unchecked exceptions 和checked exceptions有什么区别呢?
书上说checeked exceptions必须在throws 子句中声明 小弟不是很明白.
3.自己定义的异常类是unchecked 还是checked类型的?
麻烦各位了!!谢谢!