Exception in thread \"main\" java.util.InputMismatchException
What it indicates for me while I\'m using it with scanner class? Complete stacktrace
From the docs:
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.
So maybe you've called nextInt but the next token is "1.5" or "foo". You should look at the stack trace to see exactly which Scanner call caused the problem, and then work out what the token actually was, and how you want to handle that sort of failure.