In a while loop I made the loop wont return a valid answer after one invalid input and repeats "Error! Invalid customer type. Try again." over and over until I close the program. If I enter R or C as the input the first time it works fine. When I enter anything else and I get the error message "Error! Invalid customer type. Try again." like I should be which is intentional. However after that error entering r or c gives me the error again and any input I make returns the error message over and over until I close the program. Can someone please tell me whats wrong in my code that causing this?

```
public static String getValidCustomerType(Scanner sc)
{
    String customerType = ("");
      System.out.println("Enter the Customer Type");
      customerType = sc.next() ;
      boolean isValid = false;
      while (isValid == false)
      {
       if (customerType.equalsIgnoreCase("R")|customerType.equalsIgnoreCase("C") ) 
       {
         isValid = true;
       }
       else
       {
          System.out.println("Error! Invalid customer type. Try again ");
       }   
       sc.nextLine() ;
      }
   return customerType ;
} 

```