Regarding shutdownhook understanding
<p>I was going through shutdown hook feature of java  , My analysis was ..shutdownhook allows to register a thread that will be created immediatly but started only when the JVM ends ! So it is some kind of "global jvm finalizer", and you can make useful stuff in this thread (for example shutting down java ressources like an embedded hsqldb server). This works with System.exit(), or with CTRL-C / kill -15 (but not with kill -9 on unix, of course).</p>

<p>Please advise more practical uses and please also if possibe an small example will help to make understanding more clear..!</p>
