Does finally always execute in Java?

asked May 15, 2015 in Core java by rajesh
0 votes

1 Answer

0 votes

finally will be called.

The only times finally won't be called are:

  1. if you call System.exit() or
  2. another thread interrupts current one or
  3. if the JVM crashes first
answered May 15, 2015 by rajesh