Dev.bg: All in One ’24 – Lab08 Backend Question №4

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