Home Help Java F Java finally
Questions:Ask|Latest


 
 

Share on Google+Share on Google+

Java finally

Advertisement
In java, there are three clauses named try, catch and finally used as exception handler components

Java finally

     

 

In java, there are three clauses named try, catch and finally used as exception handler components. If the section enclosed within the try block generates any exception then catch block acts as an exception handler. But it is always a good practice to use finally clause after the try and catch block to handle an unexpected exception occurred in the try block. It becomes possible because the finally block always executes when the try block exits and it is also useful to write the cleanup code within the finally block because it will be executed surely whether the exception is generated or not.

Read more at:

http:/www.roseindia.net/java/exceptions/catching-and-handling-exceptions.shtml

 

Advertisements

Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: November 9, 2009

Ask Questions?    Discuss: Java finally  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments
DMCA.com