java.util
Class InputMismatchException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended byjava.util.NoSuchElementException
                  extended byjava.util.InputMismatchException
All Implemented Interfaces:
Serializable

public class InputMismatchException
extends NoSuchElementException
implements Serializable

An InputMismatchException is thrown by a scanner to indicate that the next token does not match the pattern the specified type.

See Also:
Scanner, Serialized Form

Constructor Summary
InputMismatchException()
          Constructs a InputMismatchException with no error message
InputMismatchException(java.lang.String msg)
          Constructs a InputMismatchException with msg as its error message
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InputMismatchException

public InputMismatchException()
Constructs a InputMismatchException with no error message


InputMismatchException

public InputMismatchException(java.lang.String msg)
Constructs a InputMismatchException with msg as its error message

Parameters:
msg - The specified error message