1、In some programs that may throw exceptions, we ececute try block to warm that exceptions may be thrown and needs to be handled. If no exception is thrown, JVM execute any finally block.
2、If a exception is thrown, JVM tries to find first matching catch block (may in this method or its caller). And then depending on the class of this exception, JVM execute the corresponding catch block. After that JVM execute any finally block.
3、If a exception is thrown and no catch block is been found, JVM execute any finally block.
4、After executing any finally block, if there is no excepction or the exception is been handled, the normal execution after try-catch- finally continues.
5、After executing any finally block, if the exception is been rethrown or isn't been handled, the execution aborts or the JVM propagates the exception.