Can we have try and catch blocks within finally ?

Search Interview Questions

 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text


Interview Questions and Answers

 Q1. Can we have try and catch blocks within finally ?Core Java
Ans. Yes, if we have a cleanup code that might throw an exception in the finally block, then we can have a try-catch block

 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     java   exceptions   exception handling   finally   try   catch   yesno

Related Questions

  Explain throw, throws , try and catch in Java ?
  How can we make sure that a code segment gets executed even in case of uncatched exceptions ?
  Is it necessary that each try block to be followed by catch block ?
  How does a try statement determine which catch clause should be used to handle an exception?
  Can finally block be used without catch ?
  Will finally be called always if all code has been kept in try block ?
  Which of the following is not possible ?
 Can we have try statement without catch? If try statement contains return will the finally block be executed? What happens if there is an exception inside finally block?
 How can we catch an exception thrown by another thread ?

Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: