KnowledgeBoat Logo

Computer Applications

Explain the use of System.exit(n) method in Java.

Java Conditional Stmts

6 Likes

Answer

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.

Answered By

4 Likes


Related Questions