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:
We have 1000s of tutorials on our website. Search Tutorials tutorials on our website.
Posted on: November 9, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles