I have a try/catch with a return inside. Will the finally block execute?
try {
something();
return success;
}
catch (Exception e) {
return failure;
}
finally {
System.out.println("No se si esto se va a imprimir.");
}
I know I can write this and see what happens (which is really what I'm going to do) but when I googled it, nothing came up, so I asked the question here.
This is a question translated from the original in English and adapted to the results it gives on my computer: Does finally always execute in Java? jonny five