12.8. Program Exit
A program terminates all its activity and exits when one of two things happens:
• All the threads that are not daemon threads terminate.
• Some thread invokes the exit
method of class Runtime
or class System
, and the exit
operation is not forbidden by the security manager.
Get The Java® Language Specification, Java SE 7 Edition, Fourth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.