Finally, Block in Java
Finally blocks(finally{}) are executed once the try block(try{}) exits. This block executes even after unexpected exceptions(errors) have occurred. Irrespective of the try block, the expression in finally block(finally{}) is always executed. This block(finally{}) is in-built with the capability of recovering lost and preventing the leak of resources. On closing and recovery of a file, the … Read more