To terminate a Java program, call the
This effectively kills the
java process, and stops your program immediately.
What does the number mean?
The number that you pass to the method informs the Operating System about the cause of the kill.
0 means the kill was expected. Anything other than
0 is treated as unexpected kill due to some problem.
Just leave it at
0 if you don't care.