string equal
Use the string.equals(Object other) function to compare strings, not the == operator. The function checks the actual contents of the string, the == operator checks whether the references to the objects are equal.