Running code on program exit in Java

Alex picture Alex · Apr 21, 2011 · Viewed 37.3k times · Source

Is it possible to write a method that System.exit will call when you terminate a program?