I'm currently writing a program that requires me to check several char values using a while statement and I keep getting the error "operator || cannot be applied to char, char". My code works fine with a single value but as soon as I add || or && I get this error. Any help would be greatly appreciated.
String primeColour ;
primeColour = "none" ;
String secColour ;
secColour = "none" ;
char FColour ;
FColour = 'N' ;
char SColour;
SColour = 'P';
System.out.print ("\n\nEnter primary colour for car: ") ;
Colour = user.next().charAt(0);
while (FColour != ('B' || 'L' || 'W' || 'R' || 'Y' || 'G'))
{
System.out.print("\nAvaible colors codes are B, L, W, R, Y and G");
System.out.print("\nReenter choice for primary colour: ");
FColour = user.next().charAt(0);
}