Always use equals since ==
doesn’t always work. Even though objects are the same in memory it may be stored in different places, and ==
checks for objects identity and not equality.
solved Checking if strings are equal in java using == [duplicate]