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(String s)
Constructs a new
InputMismatchException
with the supplied error message. |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public InputMismatchException()
InputMismatchException
with a null
message.public InputMismatchException(String s)
InputMismatchException
with the supplied error message.s
- the error message to report back to the user.