finally keyword in Java

The try statement also lets you run code at the end with a finally clause regardless of whether an exception is thrown.
There are two paths through code with both a catch and a finally . If an exception is thrown, the finally block is run after the catch block. If no exception is thrown, the finally block is run after the try block completes.