Search:

Type: Posts; User: Norm

Search: Search took 0.13 seconds.

  1. Re: Hi everyone i stuck at something and i need a little help please

    There should be a call to nextLine() to clear the buffer here:

    Id=s.nextInt(); //<<<<<<<<<<< this leaves endline char in buffer
    temp.setid(Id);
    System.out.println("Please enter...
  2. Re: Hi everyone i stuck at something and i need a little help please

    Does the code read the endline character out of Scanner's buffer by calling the nextLine() method after calls to the other next methods?
    Can you Post the complete code that shows when each of the...
  3. Re: Hi everyone i stuck at something and i need a little help please

    Does the code call nextLine() to clear the endline character left in the Scanner class's buffer by any of the next methods like nextInt()?
  4. Re: Hi everyone i stuck at something and i need a little help please

    The problem is with the way the Scanner class buffers the keyboard input. The lineend is not removed by the nextFloat() method. The next nextLine() reads just that lineend.
    Solution: call...
Results 1 to 4 of 4