Why do we use finally block?

Why do we use finally block? Correct Answer To execute a code with each and every run of program

Sometimes there is a need to execute a set of code every time the program runs. Even if the exception occurs and even if it doesn’t, there can be some code that must be executed at end of the program. That code is written in finally block. This block is always executed regardless of exceptions occurring.

Related Questions

Match the columns: I  II a. s block i. Sm b. p block ii. S c. d block iii. Sb d. f block iv. Sg   v. Sc   vi. Sr