可能重复:
在Java中,最终会返回特朗普吗?
这个函数返回什么?
public int wasExceptionThrown() {
try {
if(1==1)
throw new RuntimeException();
return 1;
} catch(Exception e) {
return 2;
} finally {
return 3;
}
return 0;
}
Run Code Online (Sandbox Code Playgroud)