Considering this code, can I be absolutely sure that the finally
block always executes, no matter what something()
is?
(考虑到这段代码,我能绝对确定无论something()
是finally
块始终执行吗?)
try {
something();
return success;
}
catch (Exception e) {
return failure;
}
finally {
System.out.println("I don't know if this will get printed out");
}
ask by jonny five translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…