I guess using the \n changes the way Scanner works.
Here is what I tried and what I got:
Scanner s = new Scanner(System.in);
s.useDelimiter("\n"); //<<<<<<<<<<
...
Type: Posts; User: Norm
I guess using the \n changes the way Scanner works.
Here is what I tried and what I got:
Scanner s = new Scanner(System.in);
s.useDelimiter("\n"); //<<<<<<<<<<
...
This says that the input being read was not an integer.
What did you type into the console that caused this?
Please copy and paste the full text of the error message here.