When do I need to call this method Runtime.getRuntime().addShutdownHook()
<p>When do I actually need call this method Runtime.getRuntime().addShutdownHook() and when or why I need to shutdown my application. Could anyone please explain me this by giving some example.</p>

<p>Thanks</p>
