You could, maybe, use nextLine() instead of next().
Try the following in your while loop and see what happens when you press 'Enter' and nothing else when prompted:
do {
...
Type: Posts; User: Zaphod_b
You could, maybe, use nextLine() instead of next().
Try the following in your while loop and see what happens when you press 'Enter' and nothing else when prompted:
do {
...
It works for me. Output of a run from a command line:
enter string:
Four
enter string:
score
enter string:
and
enter string:
seven