关于“退出" JAVA中的关键字 [英] about "exit" keyword in JAVA

查看:115
本文介绍了关于“退出" JAVA中的关键字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

JAVA中exit(0)和exit(1)关键字之间有什么区别?

what is the difference between exit(0) and exit(1) keywords in JAVA???

推荐答案

exit(0)表示您的程序正常结束.
exit(1)或exit(n)返回错误代码:)
exit(0) means your program ended normally.
exit(1) or exit(n) returns a error code :)


exit(int status)终止当前Java应用程序,并将状态值返回给调用过程(另一个应用程序或正在运行的程序)系统外壳.返回的值可用于指示成功或失败.
exit(int status) terminates the current Java application and returns the status value to the invoking process, either another application or the operating system shell. The returned value can be used to indicate success or failure.


这篇关于关于“退出" JAVA中的关键字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆