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

How does multithreading take place on a computer with a single cpu?

544


Explain about join() method?

551


Can a lock be acquired on a class in java programming?

535


List the interfaces which extends collection interface?

536


How many bits is a string in java?

577






Why java is considered dynamic?

755


What does arrays sort do in java?

541


Can you use this() and super() both in a constructor?

522


What is the use of System class?

612


Justify your answer that you can't define a method inside another method in java, if you can then how?

606


Can a static method be overridden in java?

558


How many times finalize method will be invoked? Who invokes finalize() method in java?

575


What is arrays fill in java?

547


Difference between java and javascript

586


Is null or empty java?

533