String values

Use the following method to compare strings:

string.equals(otherString)

Note: Do not use the == operator for strings.

Use the following method to ignore case differences:

string.equalsIgnoreCase(otherString)

Last updated

Was this helpful?