【发布时间】:2013-03-02 22:43:35
【问题描述】:
我想知道为什么例如在下面的sn-p中:
try{
//here happens a SQLException
}
catch(SQLException e){
throw new InstantiationException();
}
finally{
System.out.println("This is the finally");
}
这段代码的结果将首先打印出"This is the finally",并且只有在它打印出InstantiationException之后...
【问题讨论】:
-
throw应该开始一个新线程。在catch中这样做有意义吗?
标签: java try-catch operator-precedence finally clause