In Java, what does the finally block do?
A) It is executed only if an exception occurs
B) It is executed only if no exception occurs
C) It is executed regardless of whether an exception occurs or not
D) It is used to catch exceptions
In Java, what does the finally block do?
A) It is executed only if an exception occurs
B) It is executed only if no exception occurs
C) It is executed regardless of whether an exception occurs or not
D) It is used to catch exceptions