62,614
社区成员
发帖
与我相关
我的任务
分享
如果在catch之前,还有其他的语句呢。
//.....
try{
if(flag)
throw RuntimeException("run wrong");
System.out.println("after throw"); //run???
}
catch(RuntimeException e)
{
System.out.println(e.getMessage());
}
public static void main(String[] args){
try {
int i = 9/0;
}catch(ArithmeticException e) {
e.printStackTrace();
}
System.out.println("还在执行...");
}
//.....
try{
if(flag)
throw RuntimeException("run wrong");
System.out.println("after throw"); //run???
}
finally
{
System.out.println("over");
}