Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Aug 2005
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts

    [Java] How to end a program?

    How would you end a program to close it. In vb.net you use "End". Is there a command to terminate a program in Java without hitting enter in the consol till it closes?

  • #2
    teh Moderatorinator
    Join Date
    Sep 2004
    Location
    USA
    Posts
    2,472
    Thanks
    4
    Thanked 40 Times in 40 Posts
    Try:
    System.exit(0);

    that should do it.

  • #3
    New Coder
    Join Date
    Aug 2005
    Posts
    61
    Thanks
    0
    Thanked 0 Times in 0 Posts
    That worked. Thanks


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •