Does finally always execute in Java?

Yes, finally will be called.

The only times finally won’t be called are:

  1. If you invoke System.exit();
  2. If the JVM crashes first;
  3. If there is an infinite loop (or some other non-interruptable, non-terminating statement) in the try block;
  4. If the OS forcibly terminates the JVM process; e.g. “kill -9 ” on UNIX.
  5. If the host system dies; e.g. power failure, hardware error, OS panic, etcetera.