August 2004
Intermediate to advanced
480 pages
9h 41m
English
What do you do when you want to shut down your Windows box? You click on Start. Likewise, when your application is shutting down, it doesn't stop at all. It rather starts something new. The application starts any registered shutdown threads. Only when they complete their work will the application exit. This is the case for normal termination—for instance, when you call this code:
System.exit(0);
Passing the 0 int to the exit method means, by convention, that everything is hunky dory in your application, and that you just want to end it. Typically, a non-zero number (such as -1), as you might imagine, indicates a non-normal termination.
Abnormal termination is typically unexpected, but there are ...
Read now
Unlock full access