From: http://www.cnblogs.com/aigongsi/archive/2012/04/19/2457735.html
To summarize all the examples
1 in a try, catch, finally statement, if the try statement has a return statement, then the value of the variable in the current try is returned, and any subsequent modifications to the variable do not affect the return value in the try
2 If there is a return statement in the finally block, returns the return statement in the try or catch is ignored.
3 If an exception is thrown in a finally block, an exception is thrown in the entire try, catch, finally block
So the use of try, catch, and finally statement blocks should be noted
1 Use the return statement as much as possible in a try or catch. It is not feasible to modify the return value of a try or catch by reaching the finally block.
Avoid using the return statement in the 2 finally block, because if the return statement is used in the finally block, the exception information in the try, catch block is displayed, shielding the error from occurring
3 Finally block avoid throwing an exception again, otherwise the entire method containing the try statement block throws an exception, and the exception in the try, catch block is digested
A detailed analysis of the try, catch, finally in Java