System.exit(status)0? !0? status 地位 当status为0时,会退出程序,并且关闭虚拟机,为正常关闭程序当status非0时,会退出程序,为非正常关闭 System.exit(0)与return 的区别:return返回上一级,而system.exit(0)返回的时最上面 通常System.exit(status!=0) 被用在try catch中,当产生异常时,可以直接退出