Docs just feel contradicting each other (see actual answer below the horizontal line).
https://docs.oracle.com/javase/specs/jvms/se7/html/jvms-2.html has what you are asking about:
2.6.5. Abrupt Method Invocation Completion
[...] A method invocation that completes abruptly never returns a value to its invoker.
https://docs.oracle.com/javase/specs/jls/se7/html/jls-14.html speaks about completion of statements and blocks:
14.1. Normal and Abrupt Completion of Statements
[...]
An abrupt completion always has an associated reason, which is one of the following:
- [...]
- A return with no value
- A return with a given value
This also applies to blocks (14.2).
Then https://docs.oracle.com/javase/specs/jls/se7/html/jls-8.html says
8.4.7. Method Body
A method body is either a block of code that implements the method or simply a semicolon, indicating the lack of an implementation.
[...] If a method is declared to have a return type, then a compile-time error occurs if the body of the method can complete normally (§14.1).
TL;DR: abrupt completion does not provide a return value, return always completes (itself, the block and the method body) abruptly.
However what applies to your case is exactly one line below than what @MCEmperor
quoted:
If the finally block completes normally, then the try statement completes abruptly for reason R.
If the finally block completes abruptly for reason S, then the try statement completes abruptly for reason S (and reason R is discarded).
(I have not even added the formatting, it is bold already on the page)