Most visited

Recently visited

Added in API level 1

InputMismatchException

public class InputMismatchException
extends NoSuchElementException

java.lang.Object
    java.lang.Throwable
      java.lang.Exception
        java.lang.RuntimeException
          java.util.NoSuchElementException
            java.util.InputMismatchException


抛出 Scanner以指示检索到的标记与预期类型的模式不匹配,或标记超出预期类型的范围。

也可以看看:

摘要(Summary)

Public constructors

InputMismatchException()

null作为其错误消息字符串构造一个 InputMismatchException

InputMismatchException(String s)

构造一个 InputMismatchException ,保存对错误消息字符串 s的引用,供以后由 getMessage方法检索。

继承方法(Inherited methods)

From class java.lang.Throwable
From class java.lang.Object

Public constructors

InputMismatchException

Added in API level 1
InputMismatchException ()

null作为错误消息字符串构造一个 InputMismatchException

InputMismatchException

Added in API level 1
InputMismatchException (String s)

构造一个 InputMismatchException ,保存对错误消息字符串 s的引用,供以后通过 getMessage方法检索。

参数(Parameters)
s String: the detail message.

Hooray!