title: Is there any hook provided to register a thread with garbage collection in java?
body: <p>JVM provides you a hook to register a thread with the shutdown initiation sequence. Once a thread is registered, on every shutdown that thread is run.</p>
  
  <p>Now, is there any such a hook java provide to register a thread with JVM's Garbage collector?</p>