This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

exit statement in java

 
Mike Shn
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mike,
Try:
System.exit( int )
Regards,
Manfred.
 
Mike Shn
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9059
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Same as in C++ -- System.exit(0) is an exit without error and System.exit(1) is an exit due to an error.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic