Please note that the contents of this offline web site may be out of date. To access the most recent documentation visit the online version .
Note that links that point to online resources are green in color and will open in a new window.
We would love it if you could give us feedback about this material by filling this form (You have to be online to fill it)
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.