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 are constructors used?
Can the garbage collection be forced by any means?
What is style and indentation?
What are the advantages of autoboxing?
What is :: operator in java 8?
What are the different types of data structures in java?
What are 5 boolean operators?
Write a program to find the greatest of three numbers in java?
What about main thread in java?
Is main a function?
What is variable and example?
What is the purpose of an interface?
What is the difference between length and length () in java?
What are the common uses of "this" keyword in java ?
What is threaded programming and when is it used? : Java thread