For Strings you have to use equals to compare them, because == only compares the references.
Does it give the expected result if I compare chars with == ?
I have seen similar questions on stackoverflow, E.g.
However, I haven't seen one that asks about using == on chars.