Difference in System. exit(0) , System.exit(-1), System.exit(1 ) in Java

The parameter of exit should qualify if the execution of the program went good or bad. It’s a sort of heredity from older programming languages where it’s useful to know if something went wrong and what went wrong. Exit code is 0 when execution went fine; 1, -1, whatever != 0 when some error occurred, you can use different … Read more