What does InputMismatchException Mean?

前端 未结 3 632
半阙折子戏
半阙折子戏 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 06:46

    You should read the according javadoc (for example: http://download.oracle.com/javase/1,5.0/docs/api/java/util/Scanner.html ). The Exception is raised if the input does not match the method you used to get it, for example you use getBoolen but the next value can not be translated into a boolean.

提交回复
热议问题