Search:

Type: Posts; User: Norm

Search: Search took 0.09 seconds.

  1. Replies
    3
    Views
    628

    Re: Issue with while loops...beginner question

    Yes, that should work. Except for the case that the user has entered more than one number on a line before hitting Enter. But the current code already has that problem so there wouldn't be any...
  2. Replies
    3
    Views
    628

    Re: Issue with while loops...beginner question

    Look at the condition that will end the loop. When is the value of count changed?

    If the Scanner has an invalid value (say hasNext... is false), it will keep that value until some next method...
Results 1 to 2 of 2