public boolean removeShutdownHook(Thread hook){
  SecurityManager sm=System.getSecurityManager();
  if (sm != null) {
    sm.checkPermission(RuntimePermissionCollection.SHUTDOWN_HOOKS_PERMISSION);
  }
  if (hook == null)   throw new NullPointerException("null is not allowed here");
  if (VMState > 0) {
    throw new IllegalStateException();
  }
synchronized (hooksList) {
    return hooksList.remove(hook);
  }
}

public boolean removeShutdownHook ( Thread hook ) { SecurityManager sm = System . getSecurityManager ( ) ; if ( sm != null ) { sm . checkPermission ( RuntimePermissionCollection . SHUTDOWN_HOOKS_PERMISSION ) ; } if ( hook == null ) throw new NullPointerException ( "null is not allowed here" ) ; if ( VMState > 0 ) { throw new IllegalStateException ( ) ; } synchronized ( hooksList ) { return hooksList . remove ( hook ) ; } }
de - registers a previously - registered virtual - machine shutdown hook .
