What is the purpose of the finally clause of a try-catch-finally statement?



What is the purpose of the finally clause of a try-catch-finally statement?..

Answer / Kundan Prajapati

The purpose of the finally clause in a try-catch-finally statement is to ensure that any clean-up code (such as closing resources) is executed, regardless of whether an exception occurred during execution or not.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Advanced Java Interview Questions

What is a compilation unit?

1 Answers  


Can we have more than one action servlet?

7 Answers   HP,


What is threadfactory?

1 Answers  


If we opened windows notepad 4 times, does it starts 4 processes or 4 threads?

1 Answers  


what is meant by JRMP?

1 Answers  


What invokes a thread?s run() method?

2 Answers  


What is the purpose of the wait(), notify(), and notifyall() methods?

1 Answers  


What are the steps to write p-to-p model application?

1 Answers  


What is a thread?

3 Answers  


how can u cal servlet from java?

7 Answers  


what is the Remote Stub?

1 Answers  


how to create Calculator GUI using Gridbaglayout as like as Window Calculator??????????? (Open calculator Go-->Run-->type calc-->Enter)

1 Answers   TCS,


Categories