Win a copy of Functional Reactive Programming this week in the Other Languages 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