So I am running into this problem where I am trying to see if one input is the same as a pre defined group of variables for a class. It can be any of the variables, but I keep getting an error saying that char can not be converted to char[] the code is below. Would very much appreciate the help!
{
Scanner reader = new Scanner(System.in);
int i;
int found = 0;
char[] letter;
char A, C, T, H;
char[] okaycodes = {A, C, T, H};
System.out.printf("A - air\nC - car\nT - truck\nH - hand deliver\n");
System.out.print("Enter shipping code: ");
letter = reader.next().charAt(0);
for(i = 0; i < 5; i++)
{
if(letter == okaycodes)
{
System.out.println("Good code");