What is the purpose of the "finally" block in Java try-catch-finally statements?
A. To catch exceptions
B. To execute code that always runs, regardless of whether an exception is thrown or not
C. To handle exceptions
D. None of the above
Answer:B
What is the purpose of the "finally" block in Java try-catch-finally statements?
A. To catch exceptions B. To execute code that always runs, regardless of whether an exception is thrown or not C. To handle exceptions D. None of the above