In java after the execution of try or catch block the statements following the catch block will not be executed and the control goes to another method or the program may be terminated. So in that instance if there is a piece of code that has to be executed after the try or catch block this piece of code has to placed in finally block.