您的位置:首页 > 其它

异常什么时候抛出?

2007-05-26 16:20 197 查看
class ExceptionTest{

public static void throwMe(){

throw new RuntimeException();

}

public static void main(String[] args){

ExceptionTest et=new ExceptionTest();

try{

System.out.println("start");

et.throwMe();

System.out.println("wrong");

}finally{

System.out.println("end");

}

}

 }

//如果没有catch异常,那么肯定在finally执行完之后系统才会抛出异常,需要注意!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  string class