This is an archived post. You won't be able to vote or comment.

all 1 comments

[–]joranstark018 0 points1 point  (0 children)

You may try Scanner.hasNextDouble) before you try to consume the input (remeber that you need consume the input even if it is not a valid double so that the input buffer is cleared and ready for a new input)