I cant seem to make .indexOf() work for my char array : I need to get a String from my second array (morsecode) but i need to know the index of the letter which i can get from my first array (morse)

These are my Arrays:

    char morse[27]={' ','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
    String morsecode[27]={",",".-", "-...", "-.-.", "-..", ".", "..-.", "--.", "....", "..", ".---", "-.-", ".-..", "--", "-.", "---", ".--.", "--.-", ".-.", "...", "-", "..-", "...-", ".--", "-..-", "-.--", "--.."};

And this is me trying to access the array and get the index of the char(these block of codes are looped):

    counter=0;
    char letter = words[counter];
    letter = toLowerCase(letter);
    int location=morse.indexOf(letter);
    String code=morsecode[location];
    counter++;

Every time I try to compile this error comes out:

>exit status 1
request for member 'indexOf' in 'morse', which is of non-class type 'char [27]'

