Purpose Finally Clause Q37030982

what is the purpose of a finally clause?


Solution


finally clause is written after try-catch block.The finally clause is used to provide the capability to execute code no matter whether an exception is thrown or caught in previous try-catch block.This is usually used to close resources allocated inside try block.

color{blue}Please;let;me;know;if;you;have;any;doubts Please;upvote;this;answer.;;Thanks!!

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.