Why we need Finally with try?
pls expain with ur example..

Answer Posted / uppaluri

Finally Block always executes when the try block exists. Finally is used for more than exception handling : It allows the Programmer to avoid having cleanup code accidentally bypassed by a return, continue, or break. Putting cleanup code in a finally block is always a good practice. Hopefully you find your Solution.If you have any questions regarding Java mail me

Is This Answer Correct ?    16 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is final keyword in java? Give an example.

574


What is the difference between serializable and externalizable interfaces?

565


What exactly is methodology?

476


what is the difference between a threads start() and run() methods? : Java thread

517


What is data and its types?

570






Can Exception handling we can handle multiple catch blocks?

639


Explain about transient variables in java?

636


What is the common usage of serialization? What exceptions occur during serialization?

596


How to add menushortcut to menu item?

557


Where is the singleton class used?

578


What does escaping a character mean?

528


What is the difference between overriding & overloading?

558


How many types of the indexof method are there for strings?

484


What are the differences between string and stringbuffer?

582


When super keyword is used?

587