The program asks for a 'letter grade', presumably a, b, c, d, or f, yet the scanner is expecting an integer. That's why there is an input mismatch exception.