Share via


JavaSystem.Exit(Int32) Method

Definition

Terminates the currently running Java Virtual Machine.

[Android.Runtime.Register("exit", "(I)V", "")]
public static void Exit (int status);
[<Android.Runtime.Register("exit", "(I)V", "")>]
static member Exit : int -> unit

Parameters

status
Int32

exit status.

Attributes

Remarks

Terminates the currently running Java Virtual Machine. The argument serves as a status code; by convention, a nonzero status code indicates abnormal termination.

This method calls the exit method in class Runtime. This method never returns normally.

The call System.exit(n) is effectively equivalent to the call: <blockquote>

Runtime.getRuntime().exit(n)

</blockquote>

Java documentation for java.lang.System.exit(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to