== compares objects by reference, not by their internal value.

There are 2 solutions:

    Use String#equals() method instead to compare the value of two
String objects.

    if (letters[x].equals(cord[1]))

    
Really?!
Even better.