Answers

Question and Answer:

  Home  Sr.Java Web Developer

⟩ Tell us what is a finally block? Is there a case when finally will not execute?

Finally block is a block which always executes a set of statements. It is always associated with a try block regardless of any exception that occurs or not.

Yes, finally will not be executed if the program exits either by calling System.exit() or by causing a fatal error that causes the process to abort.

 119 views

More Questions for you: