chen-w
7/20/2017 - 3:54 AM

string equal

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.