31.0k views
2 votes
Once a try block is entered, the statements in a(n) ____ clause are guaranteed to be executed, whether or not an exception is thrown.

A) catch

B) String

C) close

D) finally

1 Answer

4 votes

Answer:

D - Finally

Step-by-step explanation:

Once the program has executed and exited the try-catch structure (when all error handling is completed), it always executes the finally clause. The finally clause is best utilized when you want code executed even if the try structure finds an exception.

User Yann Ramin
by
5.9k points