Hi,
"System.exit(0)"-->It means that it terminates the currently running Java Virtual Machine with "0" as status. what does that "status" refers to?
Even its working for System.exit(2) or for any status value.. could anyone clear that? Thanks in advance
-Thanks & Regards,
Hamsa
It is the return value from the entire process. You can test it using "errorlevel"
on a Windows box or using "status" on a Unix box. Traditionally 0 means a
successful exit and any other value should indicate a failure of some sort.
Standard C only allows for the values 0 and 1 for a success or failure across
different platforms. Most Windows people seem to ignore this capability by
not returning anything at all from their "main()" method and even making it
a void function (in C or C++). If the main() function in Java doesn't explicity
uses the exit() method 0 is assumed, i.e. a successful termination of the process.
kind regards,
Jos