public class test2{
public static void throwMe(){
throw new RuntimeException();
}
public static void main(String args[]){
try{
System.out.println("开始了");
throwMe();
System.out.println("出错了");
}finally{
System.out.println("结束了");
}
}
}
是不是先显示“开始了”,然后是运行异常,再是“出错了”,最后是结束了
public static void throwMe(){
throw new RuntimeException();
}
public static void main(String args[]){
try{
System.out.println("开始了");
throwMe();
System.out.println("出错了");
}finally{
System.out.println("结束了");
}
}
}
是不是先显示“开始了”,然后是运行异常,再是“出错了”,最后是结束了
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货