Qus:    What is the use of a finally block in exception handling?
Dec 15, 2020 09:57 2 Answers Views: 695 DIVYA

You can use a finally block if you want to clean up any resources that are allocated in a try block, and you can run code even if an exception occurs in the try block.

Prev Next
Answers (2)
PARTH Dec 16, 2020 07:26
Answer:   You can use a finally block if you want to clean up any resources that are allocated in a try block, and you can run code even if an exception occurs in the try block.

FRAUSKY Dec 16, 2020 13:01
Answer:   Finally block is used to free resources such as database connection , objects used within the try block.

Post Your Answer
Guest User

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.


Let`s Connect