Java If Statement Validate User Input, Scanner has many hasNextXXXmethods that can be used to validate input.