When will the finally block be called?

KellyPoima

New member
When will the finally block be called?
A. When there is no exception
B. When the catch does not match
C. When there is exception
D. After try-catch execution
 
Answer: d
Explanation: The try and catch statement handles some or all of the errors that may occur in a block of code, while still running code. A finally block is called after try-catch execution.
 

Tìm kiếm

Back
Top