I am using the Scanner
methods nextInt()
and nextLine()
for reading input.
It looks like this:
The problem is that after entering the numerical value, the first input.nextLine()
is skipped and the second input.nextLine()
is executed, so that my output looks like this: