Skip to content

Instantly share code, notes, and snippets.

@noboomu
Created April 2, 2015 16:01
Show Gist options
  • Save noboomu/4c2654f51d00d8a7a2b9 to your computer and use it in GitHub Desktop.
Save noboomu/4c2654f51d00d8a7a2b9 to your computer and use it in GitHub Desktop.
Java shutdown hook example.
Runtime.getRuntime().addShutdownHook(new Thread(new Runnable()
{
@Override
public void run()
{
System.out.println();
System.out.println("Exiting...");
}
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment