What is the basically use of finally while we know it
is always executed but why?
Answer Posted / srinu
In finally block writing the code of clean up code i.e
means release the database connection,close the file.The
finally block complusary be executed block when ever
exception raised or not all ways execute this finally block
Note:
The following write statement write in try or catch block
it will not execute
System.error(0);
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is equlas() and hashcode() contract in java? Where does it used?
Can we return null in java?
What is serialversionuid?
What are the differences between path and classpath variables?
Does garbage collection occur in permanent generation space in jvm?
Why are lists ordered in java?
What is a static method in java?
Which class is the superclass for all the classes?
Explain about sets?
When do we use synchronized blocks and advantages of using synchronized blocks?
What is passing parameters in java?
What is the static block?
What are java threads?
what is the difference between process and thread? : Java thread
How do I know if java is installed?