Java Data Type Tutorial - Java Runtime.halt(int status)








Syntax

Runtime.halt(int status) has the following syntax.

public void halt(int status)

Example

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);
   }
}