The System class provides the exit method to stop the Java Virtual Machine (JVM). : System « Utility Classes « SCJP

Home
SCJP
1.Java Source And Data Type
2.Operators
3.Modifiers
4.Type Casting
5.Statements
6.Object Oriented
7.Thread
8.Utility Classes
9.File
SCJP » Utility Classes » System 
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.
8.29.System
8.29.1.The System and Runtime Classes
8.29.2.A Timing Utility
8.29.3.The System class provides the exit method to stop the Java Virtual Machine (JVM).
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.