DESKTOP-S9OHBDA_20200908-王东东
问题:
public class Demo {
public static String sRet = "";
public static void func(int i) {
try {
if (i % 2 == 0) {
throw new Exception();
}
} catch (Exception e) {
sRet += "0";
return;
} finally {
sRet += "1";
}
sRet += "2";
}
public static void main(String[] args) {
func(1);
func(2);
System.out.println(sRet);
}
}
解决:
我看懂了,答案是1201。
吐槽:
感觉噩梦才刚刚开始。
近期评论