Runtime.halt(int status) has the following syntax.
public void halt(int status)
In the following code shows how to use Runtime.halt(int status) method.
// w ww .jav a 2s . co m public class Main { public static void main(String[] args) { // halt this process Runtime.getRuntime().halt(0); } }