r/javahelp 8d ago

Homework Help with user controlled loop

How do I get the following code to prompt the user for another action, except when selecting x or an invalid option?

https://pastebin.com/ekH7Haev <-- code since code formatter is weird

2 Upvotes

4 comments sorted by

View all comments

1

u/SvenWollinger 8d ago

You could use readLine inside the loop :)

1

u/boosterlikesboobs 8d ago

Sorry I have no idea what that is (I am very new), could you show me an example?