What is the difference between System.out.exit(0) and System.exit(1) ?

Started by chinmay.sahoo, 04-18-2016, 04:42:31

Previous topic - Next topic

chinmay.sahooTopic starter

System.exit(0) terminates the program normally. Whereas System.exit(1) terminates the program because of some error encountered in the program.


Lishmalinyjames

exit(0) : This causes the program to exit with a successful termination. exit(1) : This causes the program to exit with a system-specific meaning.