1. /*
  2. * @(#)InputMismatchException.java 1.3 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package java.util;
  8. /**
  9. * Thrown by a <code>Scanner</code> to indicate that the token
  10. * retrieved does not match the pattern for the expected type, or
  11. * that the token is out of range for the expected type.
  12. *
  13. * @author unascribed
  14. * @version 1.3 12/19/03
  15. * @see java.util.Scanner
  16. * @since 1.5
  17. */
  18. public
  19. class InputMismatchException extends NoSuchElementException {
  20. /**
  21. * Constructs a <code>InputMismatchException</code> with <tt>null</tt>
  22. * as its error message string.
  23. */
  24. public InputMismatchException() {
  25. super();
  26. }
  27. /**
  28. * Constructs a <code>InputMismatchException</code>, saving a reference
  29. * to the error message string <tt>s</tt> for later retrieval by the
  30. * <tt>getMessage</tt> method.
  31. *
  32. * @param s the detail message.
  33. */
  34. public InputMismatchException(String s) {
  35. super(s);
  36. }
  37. }