作者lightening (阿...冷掉了)
站内java
标题[问题] throws Exception之後能够不处理吗
时间Tue Nov 13 16:24:36 2007
一个method thorws Exception之後
就会给caller处理
那如果是在main()这种没有caller的又是所有method的caller
public static void main(String[] args) throws Exception{
//.....
}
只要在每个method都加上throws Exception
那不就所有的Exception都被抛光光 不用处理了?
这样子如果在实际的情形上会有什麽问题呢?
谢谢!!
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 163.29.40.178