关于System.exit(status)方法参数不同的问题

0x01

参考文章:

xwdreamer

0x02

问题

关于System.exit(status)这个方法,status数值不同的作用


exit

public static void exit(int status)

Terminates

the currently running Java Virtual Machine. The argument serves as a

status code; by convention, a nonzero status code indicates abnormal

termination.

This method calls theexitmethod in classRuntime. This method never returns normally.

The callSystem.exit(n)is effectively equivalent to the call:

Runtime.getRuntime().exit(n)

Parameters:

status- exit status.

Throws:

SecurityException- if a security manager exists and itscheckExitmethod doesn't allow exit with the specified status.

See Also:

Runtime.exit(int)

你可能感兴趣的:(关于System.exit(status)方法参数不同的问题)