What is the basically use of finally while we know it
is always executed but why?

Answer Posted / muffy.jad@gmail.com

The finally block is used to ensure resources are recovered
regardless of any problems that may occur.

finally is important because it allows the programmer to
guarantee the release of memory regardless of what happens
in the try block

finally is necessary when you need to set something other
than memory back to its original state.

Is This Answer Correct ?    11 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain inner classes ?

655


How to change value in arraylist java?

506


What is an empty string in css?

534


What are java methods?

577


Describe how to implement singleton design pattern in struts.

536






What is merge sort in java?

585


What is illegal identifier in java?

538


What are the advantages of java?

514


What is a protected class in java?

542


I want to re-reach and use an object once it has been garbage collected. Define how it’s possible?

576


What are the 2 types of java programs?

566


What is the difference between a static and a non-static inner class in java programming?

533


Describe string intern() methodology

596


what are the high-level thread states? : Java thread

562


What restrictions are placed on method overriding in java programming?

544