The reason for this behaviour is quite simple, look at this line:

System.out.print(keyboard.nextLine());
You are printing the input there, and you do it every time you read the input.