System.exit (0) exits the program normally, and System.exit (1) or non-zero means exits the program abnormally
System .exit(status) will exit the program regardless of the value of status.
Compared with return, there are the following differences: return is to return to the previous layer, while System.exit(status) is to return to the top layer