Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • Yep, switch or Arrays.asList is a lot cleaner Commented Jun 28, 2018 at 2:52
  • Thanks guys, but this problem requires me not to use Arrays. The instructor wants to use the while loop, test user input validation on the "item Numbers" and output a total...the if statement keeps pushing to "thank you" statement regardless if I type A123 or A555 (or any other non item input)...when I use the &&, the II's are worse. I'll try the switch Commented Jun 28, 2018 at 3:30