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

Is linked list a linear or non-linear data structure?

756


What is the difference between the boolean & operator and the && operator in java programming?

799


How do you add spaces in java?

777


Is there a sort function in java?

792


What is the difference between member variables initialization and assignment in a constructor?

949


Which is better stringbuffer or stringbuilder?

735


What does a za z0 9 mean?

779


What are the 8 data types in java?

777


What are classloaders?

801


How can we make a class virtual?

865


Tell me a few examples of final classes defined in Java API?

806


What is boolean strategy?

912


Can an interface have a class?

787


what are three ways in which a thread can enter the waiting state? Or what are different ways in which a thread can enter the waiting state? : Java thread

755


What is the purpose of static methods and static variables?

787