0 votes
in JAVA by
What is the purpose of the “finally” block in a try-catch-finally statement in Java?

a) To catch and handle exceptions

b) To specify the code that should be executed after the try or catch block

c) To specify the code that should be executed before the try or catch block

d) None of the above

1 Answer

0 votes
by

Answer: b) To specify the code that should be executed after the try or catch block

Explanation: The “finally” block is used to specify the code that should be executed after the try or catch block, regardless of whether an exception was thrown or not.

...