| Author |
Exiting a program through a switch
|
Chris Buskulic
Greenhorn
Joined: Sep 23, 2003
Posts: 5
|
|
I was wondering how I would go about coding an exit for a program in a switch statement. Heres a sample of my code: switch (option) { case 'C': case 'c': pay *=hours; System.out.println("Gross pay is" +Utility.moneyFormat(balance)); break; case 'A': case 'a': System.out.println("Chris Buskulic"); case 'E': case 'e': E is my exit choice through a menue given to the user.
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26218
|
|
|
System.exit()
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
 |
|
|
subject: Exiting a program through a switch
|
|
|