JAVA try...catch...finally中的执行顺序和return语句
摘要:
public static int get() { try { System.out.println("try"); return 1; //throw new Exception(); } catch (Exception e) { System.out.println("catch"); return 2; } finally { System.out.println("finally"); return 3; }} 结果: try finally 3 public static int get() { try { System. 阅读全文
posted @ 2011-07-25 09:54 小山丘 阅读(352) 评论(0) 推荐(0) 编辑