java finally的问题
摘要:有次笔试的时候遇到finally的考题,例如public static int test(){ int a = 0; try { throw new Exception(); } catch (Exception e) { a = 1; return a; } finally{ a = 2; return a; } } 调用这个静态test()方法,返回a的值是什么呢?结果是2,...
阅读全文
posted @ 2012-10-29 10:11
浙公网安备 33010602011771号