java异常处理的标准写法

1.try{ 
}catch(Exception e){//异常的名称 
}catch(Exception e){//catch语句是可以有很多个的 
syso(e) 
}finally{//finally里面写一些善后的语句,比如关闭某个打开却还没有关闭的流等语句 
}

1.try{ 
}catch(Exception e){//异常的名称 
}catch(Exception e){//catch语句是可以有很多个的 
syso(e) 
}finally{//finally里面写一些善后的语句,比如关闭某个打开却还没有关闭的流等语句 
}

猜你喜欢

转载自blog.csdn.net/qauchangqingwei/article/details/81051042