Gia Mata wrote:...
////What should I put here guys??? I wanna go back to the previous menu wherein I R means return to add more items to selected salesperson.
First: Welcome to JavaRanch, Gia.
Second: Please read the
UseCodeTags (←click) page; especially the bit about
long lines. I actually tried putting code tags in for you, but your lines are so long (and your indenting is also bad) that it actually made the
thread harder to read than before.
[Edit: I notice that Ulf's done it for you anyway; but do you see that it now doesn't fit on the screen? That's because your lines are
too long.
You can edit your post via the 'Edit' button to break them up if you want.]
Third: To answer your actual question: Put all that code inside a larger loop which you don't break out of until the user enters something that causes you to quit.
Unfortunately, what you'll then end up with is a gigantic block of hellishly indented code; so an alternative is to take most of that "inputting" stuff out of
main() and put it in a separate method, then call
that method from a loop.
But even better still is probably to
StopCoding (←click) and
write down what you need to do
in English (or your native language) before you write anything else in
Java.
It looks to me like you just started coding and have now run into a roadblock, and that's not usually a good way to work.
You may also find the
UserInput page worth reading, because user input is notoriously difficult to get right the first time you try it.
HIH
Winston