public class InputMismatchException extends NoSuchElementException
Scanner instance encounters a mismatch
between the input data and the pattern it is trying to match it
against. This could be because the input data represents an
out-of-range value for the type the pattern represents, or simply
because the data does not fit that particular type.| Constructor and Description |
|---|
InputMismatchException()
Constructs a new
InputMismatchException
with a null message. |
InputMismatchException(java.lang.String s)
Constructs a new
InputMismatchException
with the supplied error message. |
public InputMismatchException()
InputMismatchException
with a null message.public InputMismatchException(java.lang.String s)
InputMismatchException
with the supplied error message.s - the error message to report back to the user.