1.

Will the finally block be executed if the code System.exit(0) is written at the end of try block?

Answer»

NO. The control of the program post System.exit(0) is immediately gone and the program gets TERMINATED which is why the FINALLY BLOCK never gets EXECUTED.



Discussion

No Comment Found