"I'm getting an error that "keyboard.readLine()" does not represent a real integer."

its telling you your error is with that line so look at the scanner link jps provided and see if there is one...