+ 3

What is System.exit()

what is System.exit() in java , and how can i use it ?

8th Apr 2018, 7:13 PM
AhmedRamadan
AhmedRamadan - avatar
1 Answer
+ 12
System.exit(0) terminates the jvm. If you pass the argument 0 it is a normal exit of the process without errors, everything else but 0 means that an error occurred.
8th Apr 2018, 7:39 PM
Tashi N
Tashi N - avatar