8.29.3.The System class provides the exit method to stop the Java Virtual Machine (JVM).
public class MainClass{ public static void main(String[] argv){
System.exit(9);
}
}
The exit method should not be called in a Java applet.
It is the Web browser's responsibility to halt the JVM as needed.