Hi there,
I'm working on a simple java program that allows a user to input numbers via console, throws an exception when a string is entered, and tallys up and prints the integers when the user simply hits enter with no input.
i.e.
Please enter a value: 5
Please enter a value: five
Error: Please enter a value.
Please enter a value: 4
Please enter a value:
9
My question is what does Scanner read or categorize as "Enter", I want to try an if (in.next().equals or == \n or something), but I don't know if thats what I need to do, or if there is a Scanner method I am not seeing/understanding that returns a boolean for it.