to top
Android APIs
public class

InputMismatchException

extends NoSuchElementException
implements Serializable
java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ java.lang.RuntimeException
         ↳ java.util.NoSuchElementException
           ↳ java.util.InputMismatchException

Class Overview

An InputMismatchException is thrown by a scanner to indicate that the next token does not match or is out of range for the type specified in the pattern.

Summary

Public Constructors
InputMismatchException()
Constructs a new InputMismatchException with the current stack trace filled in.
InputMismatchException( String msg)
Constructs a new InputMismatchException with the stack trace filled in and msg as its error message.
[Expand]
Inherited Methods
From class java.lang.Throwable
From class java.lang.Object

Public Constructors

public InputMismatchException ()

Added in API level 1

Constructs a new InputMismatchException with the current stack trace filled in.

public InputMismatchException (String msg)

Added in API level 1

Constructs a new InputMismatchException with the stack trace filled in and msg as its error message.

Parameters
msg the specified error message.
No examples for this method.
Frequently called with: [Clear]
Portions of this page are reproduced from work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. The original page is available here.