public static void exit (int code)
Since: API Level 1
Causes the virtual machine to stop running and the program to exit. If runFinalizersOnExit(boolean) has been previously invoked with a true argument, then all all objects will be properly garbage-collected and finalized first.
Parameters
code the return code.
Throws
SecurityException if the running thread has not enough permission to exit the virtual machine.