aspose file tools
The moose likes Beginning Java and the fly likes program termination Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Groovy Fundamentals video training course this week in the Groovy forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "program termination" Watch "program termination" New topic

program termination

Dave Kairys
Ranch Hand

Joined: Sep 09, 2005
Posts: 33
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.

Wayan Saryada
Ranch Hand

Joined: Feb 05, 2004
Posts: 105

Hi Dave,

You can use System.exit(int status) method to terminate program execution.

Website: Learn Java by Examples
wood burning stoves
subject: program termination