Class InputMismatchException

java.lang.Object
java.lang.Throwable
java.lang.Exception
All Implemented Interfaces:
Serializable

public classInputMismatchExceptionextendsNoSuchElementException
Thrown by aScanner to indicate that the token retrieved does not match the pattern for the expected type, or that the token is out of range for the expected type.
Since:
1.5
See Also:
  • Constructor Details

    • InputMismatchException

      public InputMismatchException()
      Constructs anInputMismatchException withnull as its error message string.
    • InputMismatchException

      public InputMismatchException(String s)
      Constructs anInputMismatchException, saving a reference to the error message strings for later retrieval by thegetMessage method.
      Parameters:
      s - the detail message.