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.


/*from   w w w .j  av a2  s .co  m*/

public class Main {

   public static void main(String[] args) {

      // halt this process
      Runtime.getRuntime().halt(0);
   }
}




















Home »
  Java Tutorial »
    java.lang »




Boolean
Byte
Character
Class
Double
Enum
Float
Integer
Long
Math
Number
Object
Package
Process
ProcessBuilder
Runnable
Runtime
SecurityManager
Short
StackTraceElement
StrictMath
String
StringBuffer
StringBuilder
System
Thread
ThreadGroup
ThreadLocal
Throwable