| Author |
exit statement in java
|
Mike Shn
Ranch Hand
Joined: May 26, 2001
Posts: 149
|
|
Hello I know that C++ uses the exit(0) and exit(-1) statement. Does Java uses something similar? Thanks a lot
|
 |
Manfred Leonhardt
Ranch Hand
Joined: Jan 09, 2001
Posts: 1492
|
posted

0
|
Hi Mike, Try: System.exit( int ) Regards, Manfred.
|
 |
Mike Shn
Ranch Hand
Joined: May 26, 2001
Posts: 149
|
|
Originally posted by Manfred Leonhardt: Hi Mike, Try: System.exit( int ) Regards, Manfred.
Thanks but what is difference between System.exit(0) and System.exit(1) ??? Thanks a lot
|
 |
Marilyn de Queiroz
Sheriff
Joined: Jul 22, 2000
Posts: 9033
|
|
|
Same as in C++ -- System.exit(0) is an exit without error and System.exit(1) is an exit due to an error.
|
JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
|
 |
 |
|
|
subject: exit statement in java
|
|
|