File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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
I agree. Here's the link:
subject: program termination
It's not a secret anymore!