In Java, a finally block is guaranteed to be executed, unless the virtual machine exits abruptly due to an uncaught exception or a call to System.exit.