how to check if an scanner time value is an integer code example Example: scanner check if int boolean isAnInt = scanner.hasNextInt();