You can do anything inside a finally clause that you can do elsewhere, including executing break, continue, or return statements, or throwing exceptions. Such actions inside a
finally clause, however, can have some surprising effects. For example, consider a
finally clause that is entered because of an uncaught exception. If the
finally clause executes a return, the method would complete normally via the return, not abruptly by throwing the exception. The exception would have in effect been handled by the finally clause instead of a catch clause.
From:
Exceptions in Java