When input.nextLine() executes, it consumes the "end of line" still in the buffer from the first input. Instead, use input.nextLine() immediately after input.nextInt() Here is the source- https://stackoverflow.com/questions/13102045/scanner-is-skipping-nextline-after-using-next-nextint-or-...