Use of System.exit(0) [duplicate]

ぐ巨炮叔叔 提交于 2019-11-29 03:45:57

From the JAVA Documentation:

The argument serves as a status code; by convention, a nonzero status code indicates abnormal termination.

And Wikipedia adds additional information.

It's the return value that the Java process will report to the calling process.

It hasn't really got a precise definition, but the usual convention is that 0 means success and any non-zero value represents a failure.

The argument is the return code which the java process will return (0 means "successful"). It can be used when a Java program is a part of a batch script, or by build tools such as Ant.

hhafez

Have a look here

The argument serves as a status code; by convention, a nonzero status code indicates abnormal termination.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!