What is the purpose of the finally clause?

Answers were Sorted based on User's Feedback



What is the purpose of the finally clause?..

Answer / dhawal

the code block in finally block must be executed if
exception throws or not,except if we write system.exit(0);

Is This Answer Correct ?    4 Yes 0 No

What is the purpose of the finally clause?..

Answer / ranganathkini

The finally clause is used to ensure that a single statement
or a set of statements are executed irrespective of whether
or not an exception is thrown/caught inside a method.

Is This Answer Correct ?    2 Yes 0 No

What is the purpose of the finally clause?..

Answer / ravikiran

finally clause is used to get executed irrespective of the
exception raising inorder to conserve the resources

Is This Answer Correct ?    3 Yes 1 No

Post New Answer

More Core Java Interview Questions

What are default methods ?

0 Answers  


What is a substring of a string?

0 Answers  


What is the full meaning of java?

0 Answers  


What is string data type?

0 Answers  


Is string a wrapper class?

0 Answers  






What is more advisable to create a thread, by implementing a Runnable interface or by extending Thread class?

5 Answers  


how to get the max salary and name of employee from arraylist without using the Comperator or even Comparable interface?

2 Answers  


What is a qms manual?

0 Answers  


can u handle an error if u write Thowable in the catch class lise try { some errorneous code }catch(Throwable e){ ...}

4 Answers  


What is the difference between choice and list?

0 Answers  


Explain the access modifiers for a class, method and variables?

0 Answers   Global Logic,


Can anonymous class have constructor?

0 Answers  


Categories