Search:

Type: Posts; User: Darryl.Burke

Search: Search took 0.09 seconds.

  1. Replies
    6
    Views
    1,562

    [SOLVED] Re: Problem with Scanner ?

    Well, considering that you're generating the random number inside the loop, it changes every time the loop repeats. Are you sure that's what you wanted?

    db
  2. Replies
    6
    Views
    1,562

    [SOLVED] Re: Problem with Scanner ?

    Scanner#nextInt doesn't consume the newLine, which remains in the scanner's buffer and is consumed when you next call Scanner#nextLine. You need a "dummy" nextLine to clear the buffer.
    userGuess =...
Results 1 to 2 of 2