And what happens if multiple threads have been added for Shutdown Hook? All of them simply get started right before the VM’s shutting down, with all code in these threads being executed. Yet the one essential thing to remember about multiple threads is that there will be no definite order in which they run. They all are subject and suitable for getting SPU time prior to the VM’s shutting down. And actually they delay the final shut down until the last thread is run and stops. Yet the working of multiple threads may be synchronized the same way as in case of a normal thread usage.