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
What are exceptions
Why java is call by value?
What is the difference between Grid and Gridbaglayout?
What is the difference between a window and a frame in java programming?
What is string literal in java?
What is a substring of a string?
Why to use nested classes in java?
What is unmodifiable list in java?
What is module with example?
What is the char data type?
what is interface in java? Explain
How to create com object in Java?
What is string data?
Why is multiple inheritance not supported in java?
What are the Class Libraries ?