Finally block

Hi may I know actual use of final block. where we can use with any example…?


Final Block is mainly used to execute a given set of statements, whether an exception is thrown or not thrown.

Simple Example is Let say you open a program, You have to close the program whether it throws the exception or not, then we can place in Final block

Check below documentation too

Follow Link

Hope this helps you