Number of questions 1,751
Number of tests completed 250,977
Number of questions answered 3,748,390
Number of registered users 19,125
Sign In | Register
Skip Navigation Links
Question: Is finally block executed if there is no exception?
Answer1: No
Answer2: Yes
Answer3: Sometimes
Answer4: None
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.

Correctly answered: 27616
Incorrectly answered: 5755
Terms of Use Ver. 2.0.6783.38332