0

What does this code exactly mean? What does the 0 stand for?

System.exit(0);

28th Jun 2017, 1:45 PM
Tina
2 ответов
+ 10
It terminates the currently running Java Virtual Machine.The argument serves as a status code, by convention, a nonzero status code indicates abnormal termination. This will stop the jvm normally :D
28th Jun 2017, 1:54 PM
Dev
Dev - avatar
+ 2
It exits your program, and 0 is the exit code. 0 means it went fine, whereas other values indicate that it didn't.
28th Jun 2017, 1:51 PM
AgentSmith