Answer Posted / sandeep
While exception handling if exception is thrown programme
will abort abnormally but it can leads to some problamatic
situation..hence we have to ensure some code will always run
whtever happen..finalization does so. Some useful tasks that
we have to do ( cleaning up some resources or closing some
connection or socket etc) we can gurantee it will be done by
simply putting it in finally block.
It will run always (Unless System.exit() is not called) and
hence future problem can be handled.
Is This Answer Correct ? | 7 Yes | 2 No |
Post New Answer View All Answers
Why java is used everywhere?
Have you ever used hashtable and dictionary?
Give few examples of final classes defined in Java API?
what is the difference between process and thread? : Java thread
Explain wrapper classes in java?
What are adapter classes?
What is the meaning of 3 dots in java?
What is the difference between class & structure?
What is the difference between jvm and jre? What is an interface?
What are anonymous inner classes?
What does string [] args mean?
What is parsing and its types?
What is preflight request?
What is tochararray in java?
What things should be kept in mind while creating your own exceptions in java?