cat
dog
horse
Out of this group of only the first letters can be used c, d, h where as other groups like ant and antelope would require ant, ante.
Given this problem I've been trying to figure out how to do this and so far I'm manage to split each word into char arrays but when I try to compare them with other copies for a match I get two errors, Either I get incompatible data types
CODE
char[] cLetters = word.toCharArray();
//System.out.println(cLetters.length);
for(char letter : cLetters)
{
if(letter == "c");
}
//System.out.println(cLetters.length);
for(char letter : cLetters)
{
if(letter == "c");
}
or I get char cannot be dereferenced. I dont know how to use them exactly so I need some help, I have been looking at the API but theres so many methods my eyes are gone blurry lol. I've got to be able to compare each letter to another, whats the method to do that?


