+ 1

Difference between System.exit(0) and System.exit(any number);

I have searched it for internet but didn't get the accurate answer ...

23rd Mar 2019, 10:40 AM
mn121
mn121 - avatar
2 Answers
+ 7
exit(0) : Generally used to indicate successful termination. exit(1) or exit(-1) or any other non-zero value – Generally indicates unsuccessful termination.
23rd Mar 2019, 11:12 AM
D_Stark
D_Stark - avatar
+ 2
D_Stark I have got these results in the internet also... But is there any difference which can be seen in the output screen....
24th Mar 2019, 1:44 AM
mn121
mn121 - avatar