- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- java.util.NoSuchElementException
-
- java.util.InputMismatchException
-
- 实现的所有接口
-
Serializable
public class InputMismatchException extends NoSuchElementException
由Scanner抛出,表示检索到的令牌与预期类型的模式不匹配,或者令牌超出预期类型的范围。- 从以下版本开始:
- 1.5
- 另请参见:
-
Scanner, Serialized Form
-
-
构造方法摘要
构造方法 构造器 描述 InputMismatchException()构造一个InputMismatchException其中包含null作为其错误消息字符串。InputMismatchException(String s)构造一个InputMismatchException,保存对错误消息字符串s的引用,以供以后通过getMessage方法检索。
-
方法摘要
-
-
-
构造方法详细信息
-
InputMismatchException
public InputMismatchException()
构造一个InputMismatchException其中包含null作为其错误消息字符串。
-
InputMismatchException
public InputMismatchException(String s)
构造一个InputMismatchException,保存对错误消息字符串s的引用,以供以后通过getMessage方法检索。- 参数
-
s- 详细信息。
-
-