Number of questions 1,751
Number of tests completed 249,171
Number of questions answered 3,726,767
Number of registered users 19,071
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: 27081
Incorrectly answered: 5619
Terms of Use
contact@quiznetonline.com Ver. 2.0.6783.38332