public class InputMismatchException
extends NoSuchElementException
| java.lang.Object | |||||
| ↳ | java.lang.Throwable | ||||
| ↳ | java.lang.Exception | ||||
| ↳ | java.lang.RuntimeException | ||||
| ↳ | java.util.NoSuchElementException | ||||
| ↳ | java.util.InputMismatchException | ||||
抛出 Scanner以指示检索到的标记与预期类型的模式不匹配,或标记超出预期类型的范围。
也可以看看:
Public constructors |
|
|---|---|
InputMismatchException() 用 null作为其错误消息字符串构造一个 |
|
InputMismatchException(String s) 构造一个 |
|
Inherited methods |
|
|---|---|
java.lang.Throwable
|
|
java.lang.Object
|
|
InputMismatchException ()
用 null作为错误消息字符串构造一个 InputMismatchException 。
InputMismatchException (String s)
构造一个 InputMismatchException ,保存对错误消息字符串 s的引用,供以后通过 getMessage方法检索。
| Parameters | |
|---|---|
s |
String: the detail message. |