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...
Type: Posts; User: Norm
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...
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...
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()?
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...