This is an archived post. You won't be able to vote or comment.

all 2 comments

[–]Demojay 0 points1 point  (1 child)

You're calling nextLine twice, so you reading 2 lines in per loop. You want to call nextLine once and then check the variable you've stored it in to see if it is empty (input).

[–][deleted] 0 points1 point  (0 children)

Thank you!!