Why am I getting InputMismatchException?
问题 So far I have this: public double checkValueWithin(int min, int max) { double num; Scanner reader = new Scanner(System.in); num = reader.nextDouble(); while (num < min || num > max) { System.out.print(\"Invalid. Re-enter number: \"); num = reader.nextDouble(); } return num; } and this: public void askForMarks() { double marks[] = new double[student]; int index = 0; Scanner reader = new Scanner(System.in); while (index < student) { System.out.print(\"Please enter a mark (0..30): \"); marks