摘要: 异常(Exception):特殊的:RuntimeException(运行期异常,编译时不检查)其他的异常为编译期异常,编译时报错必须用try-catch否则编译不能通过try{}catch(){}:语句块就是用来进行异常处理的finally{}不管发不发生异常都要执行,在数据库关闭连接的地方有用try { int num = Integer.parseInt("abc"); System.out.println("bbbbbb"); System.out.println("cccccc"); }catch(Exception e){ 阅读全文
posted @ 2012-07-10 16:26 会飞的辉 阅读(103) 评论(0) 推荐(0) 编辑