How do I allow the user to re enter the customerID number if it does not match 5 digits in length?
for (int i = 0; i < 5; i++) {
System.out.println("Enter the 5-digit ID number of your customer "
+ (i + 1) + "'s below:");
customerID[i] = myScanner.nextLine();
if (customerID[i].length() != 5) {
// What code goes here. I just want to make it so they can
// re-enter the customerID
}
Here is one way to do it: