aspose 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


Win a copy of Spring in Action this week in the Spring forum!
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: 11402
    
  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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Looping correctly