ICSE Class 10 Computer Applications
Question 6 of 43
Conditional Constructs in Java — Question 6
Back to all questions 6
Question Question 6
Explain the use of System.exit(n) method in Java.
The currently running program can be terminated with the help of the exit() method of the System class - System.exit(n). The argument n serves as a status code. A non-zero status code indicates abnormal termination, and a zero status code indicates a normal termination.