Did you try what I recommended earlier:
You must call nextLine() to clear the newline character from Scanner's buffer.
nextInt leaves the newline in the buffer.
Call nextLine to clear it.
Type: Posts; User: Norm
Did you try what I recommended earlier:
You must call nextLine() to clear the newline character from Scanner's buffer.
nextInt leaves the newline in the buffer.
Call nextLine to clear it.
From post #4
I suspect the problem is with the newline character being left in the Scanner class's buffer after calling nextInt()
You must call nextLine() to clear the newline character from...
Does it work now?
Can you show what the problem is? Add some comments to what you posted to show where the problem is.
I suspect the problem is with the newline character being left in the Scanner class's buffer...
Please explain. Post the full contents of the console showing what happened.
What method is trying to read what you are entering?
nextInt() only accepts numeric digits.