String values are compared using '!=', not 'equals()' code example Example: how to know if String is the same java String1.equals(String2)