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
Class c implements interface I containing method m1 and m2 declarations. Class c has provided implementation for method m2. Can I create an object of class c?
What are the 4 versions of java?
Explain about OOPS concepts and fundamentals.
What is the benefit of abstract class?
What is double in java?
How many tetrahedral voids are there in bcc?
What happens when I use / and % with a negative numerator?
What are the library functions in java?
What methods are used in Servlet?Applet communication?
What is java argument list?
I want my class to be developed in such a way that no other class (even derived class) can create its objects. How can I do so?
Explain different states of a thread in java?
what is singleton in java?
What are latest features introduced with java 8?
Explain the importance of throws keyword in java?