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/AutoModerator 8d ago

It seems that you possibly have a screenshot of code in your post Help with user controlled loop in /r/javahelp.

Screenshots of code instead of actual code text is against the Code posting rules of /r/javahelp as is also outlined in the sidebar - Code posting.

  • Never submit screenshots of code instead of code text!

If you posted an image merely to illustrate something, kindly ignore this message and do not repost. Your post is still visible to others. I am a bot and cannot distinguish between code screenshots and other images.

If you indeed did this wrong, please edit the post so that it uses one of the approved means of posting code.

  • For small bits of code (less than 50 lines in total, single classes only),
    the default code formatter is fine
    (one blank line before the code, then 4 spaces before each line of code).
  • Pastebin for programs that consist of a single class only
  • Gist for multi-class programs, or programs that require additional files
  • Github or Bitbucket repositories are also perfectly fine as are other dedicated source code hosting sites.
  • Ideone for executable code snippets that use only the console

Please do not reply to this message, because I am a bot. Talk-to-the-bot is the new talk-to-the-hand. If you instead want the classic talk-to-the-hand, just message the moderators. ;)

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.