December 8, 2009 at 10:44 AM
The integer value inside the exit() function is the status code for the termination of the JVM. It does not effect the actual command. The exit(0) means program is executed and exited normally otherwise program executes with errors.
The retrun(0) is returned to the calling function when a program is executed successfully and return(1) is returned if an error occurred during the execution.