Java Reference
In-Depth Information
may return library threads that do not terminate and for which join will
not return.
The decision to shutdown a program should be made at a high-level
within the applicationoften within main or the run method of a thread
in the top-level application ThreadGroup or in the code that responds
to events in a graphical user interface. Methods that encounter errors
should simply report those errors via exceptions that allow the high-
level code to take appropriate action. Utility code should never termin-
ate an application because it encounters an errorthis code lacks know-
ledge of the application that allows an informed decision to be made;
hence, exceptions are used to communicate with higher-level code.
 
Search WWH ::




Custom Search