Exception in thread "main" java.util.InputMismatchException
当我将它与扫描仪类一起使用时,它对我意味着什么?完整的堆栈跟踪是
Exception in thread "main" java.util.InputMismatchException
at java.util.Scanner.throwFor(Unknown Source)
at java.util.Scanner.next(Unknown Source)
at java.util.Scanner.nextInt(Unknown Source)
at java.util.Scanner.nextInt(Unknown Source)
at ParseString.main(ParseString.java:9)
最佳答案
请参阅JavaDoc处的文档.
答案应该很明确:
Thrown by a Scanner to indicate that the token retrieved does not match the pattern for the expected type, or that the token is out of range for the expected type.
关于java - 输入不匹配异常是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6674910/