What does InputMismatchException Mean?

前端 未结 3 572
半阙折子戏
半阙折子戏 2020-12-12 06:02
Exception in thread \"main\" java.util.InputMismatchException

What it indicates for me while I\'m using it with scanner class? Complete stacktrace

3条回答
  •  时光说笑
    2020-12-12 07:09

    Please see the docs at the JavaDoc.

    The answer should be clear:

    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.

提交回复
热议问题