File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Looping correctly Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Looping correctly" Watch "Looping correctly" New topic
Author

Looping correctly

Sean Magee
Ranch Hand

Joined: Aug 23, 2004
Posts: 69
What is the best way tp loop it back to the user, for example in this code





But i couldnt figure out how, if the user clicked "yes" option, to return it back to the beginning to do it over again.

Could anyone help me here?
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11156
    
  16

how about wrapping most of your code in a

do
{
} while (something is true)
[ September 10, 2004: Message edited by: fred rosenberger ]

There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Looping correctly
 
Similar Threads
Compiler error about new
values changed, math didnt.
How much do you weigh?
bmi calculation help please!
values changed, math didnt.