Re: Newbie question on identifiers for basic catch statements



[...]
The error that the compiler gives looks like this
Program6.java:25: cannot find symbol
symbol : class InputMismatchException
location: class QuestionTwoShot
} catch (InputMismatchException e) {
^
1 error
Hi!
You didnt import the class, so the compiler doesnt know where to find it.
Import it with "import java.util.ImportMismatchException"

Example:

import java.util.ImportMismatchException;
public class QuestionTwoShot {
....
}

bye, Ralf
.