Java Runtime.exit(int status)
Syntax
Runtime.exit(int status) has the following syntax.
public void exit(int status)
Example
In the following code shows how to use Runtime.exit(int status) method.
//ww w . j a v a 2s . c o m
public class Main {
public static void main(String[] args) {
// cause the program to exit
Runtime.getRuntime().exit(0);
}
}