• +91 9723535972
  • info@interviewmaterial.com

Java Interview Questions and Answers

Question - Does the code in finally block get executed if there is an exception and a return statement in a catch block?

Answer - If an exception occurs and there is a return statement in catch block, the finally block is still executed. The finally block will not be executed when the System.exit(1) statement is executed earlier or the system shut down earlier or the memory is used up earlier before the thread goes to finally block.

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners