A block of code that always runs regardless of whether an exception occurred.
A block that always executes after try-catch, used for tasks like releasing resources. It's easy to overlook that finally still runs even if try or catch already executed a return, and a trap exists where a return written inside finally silently overwrites the original return value.
© 2026 ITBGM