top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration
Print Preview

In java is the finally block is always guaranteed to be execute?

+3 votes
posted Sep 5, 2013 by Arvind Singh

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

+1 vote

Finally will be called even if an exception was thrown in Try block.

The only time finally won't be called is if you call System.exit() or if the JVM crashes first.

answer Sep 5, 2013 by Satyabrata Mahapatra

Useful Links with Similar Problem
Contact Us
+91 9880187415
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Karnataka INDIA.