java find out if a string is equal to another code example Example: how to know if String is the same java String1.equals(String2)