Number of questions 1,751
Number of tests completed 252,495
Number of questions answered 3,765,643
Number of registered users 19,174
Sign In | Register
Skip Navigation Links
Question: Is finally block executed if there is no exception?
Answer1: No
Answer2: Yes
Answer3: Sometimes
Answer4: None
Answer5:
Answer: Yes

Explaination: The finally block is always executed, regardless of whether an error was thrown. If code in the try block doesn't throw an error (that is, if the try block completes normally), then the code in the finally block is still executed. The finally block is executed even if the try block exits using a return statement.
Link:

Correctly answered: 28062
Incorrectly answered: 5870
Terms of Use
contact@quiznetonline.com Ver. 2.0.6783.38332