- System.exit(0) – It indicates that execution runs successfully.
- System.exit(1)- It indicates something which is expected went wrong.
Example : Bad command Line, File not found, could not connect to server.
- System.exit(-1)- It indicates something which is Un-expected went wrong.
Example : System error, Unanticipated exception, Externally forced termination.