He's either confused or ???
You can use numeric operators: ==, <, > etc with char values to compare them.
Type: Posts; User: Norm
He's either confused or ???
You can use numeric operators: ==, <, > etc with char values to compare them.
@Mr.777 Can you post code that does that?
A call to nextLine() will read the newline out of the buffer.
What you are seeing is what the Scanner class does when it has a newline character left in its buffer after you entered a line and pressed.Enter. The next() method does NOT read the newline character...
Add some println statements that print out the values of all the variables used to control the loop and to show what was read. Use a small input file for testing. Execute the code and look at the...