TryCatchFinally.java 的return 有关问题
TryCatchFinally.java 的return 问题。static int f() {// 这里报编译错误:must return a resutl of type i
TryCatchFinally.java 的return 问题。
static int f() {// 这里报编译错误:must return a resutl of type int!int id = 0;try {return id;} catch (Exception e) {} finally {}}static int f2() {// 但是这里怎么不报 错误呢?int id = 0;try {return id;} finally {}}
参考资料:1.http://topic.csdn.net/u/20091211/15/a8228a73-f2fe-40c0-92f2-1482224f41dd.html
2.http://download.oracle.com/javase/1.4.2/docs/tooldocs/windows/javap.html