the nextLine() method advances the scanner past the current line.
I think the nextInt() method cannot do that..
kindly see this link Scanner (Java Platform SE 7 )
Type: Posts; User: dicdic
the nextLine() method advances the scanner past the current line.
I think the nextInt() method cannot do that..
kindly see this link Scanner (Java Platform SE 7 )
That is because of the nextInt() method that you have used, you have read the number,
but you have not skipped the line of the user's input,
to avoid the bugs insert this code after you used...