Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Java

Idiom #87 Stop program

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

throw new RuntimeException();
throw new Error();
System.exit(0);

This stops the whole JVM.
Status code 0 means "normal termination".
return 0;

Only works in main(), actually.

New implementation...