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 ()

Since: API Level 1

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

public InputMismatchException (String msg)

Since: 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.