It seems like return
is overridden by finally
in a catch block. Is that correct?
For example:
public String myMethod() {
try {
// Do stuff
} catch(Exception e) {
// Handle exception
return failed;
} finally {
// Close sockets
}
return success;
}
If I get an exception in the above code the method still returns success.