Logo

Programming-Idioms

History of Idiom 87 > diff from v1 to v2

Edit summary for version 2 by :

Version 1

2015-09-13, 11:15:08

Version 2

2015-09-13, 11:17:55

Idiom #87 Stop program

Exit immediatly.
If some extra cleanup work is executed by the program runtime (not by the OS itself), describe it.

Idiom #87 Stop program

Exit immediatly.
If some extra cleanup work is executed by the program runtime (not by the OS itself), describe it.

Code
System.exit(0)
Code
System.exit(0);
Comments bubble
This stops the whole JVM.
Status code 0 means "normal termination".
Doc URL
https://docs.oracle.com/javase/8/docs/api/java/lang/System.html#exit-int-
Doc URL
https://docs.oracle.com/javase/8/docs/api/java/lang/System.html#exit-int-