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

program termination

 
Dave Kairys
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a Java keyword that will terminate a program? I have a loop set up asking the user if they would like to continue. If 'yes' continue, if 'no' terminate program. I have tried 'break', 'end', and 'exit', all with no luck.

Thanks,
Dave
 
Wayan Saryada
Ranch Hand
Posts: 105
IntelliJ IDE MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Dave,

You can use System.exit(int status) method to terminate program execution.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic