[Solved] Why I new the object not equal to the String? [duplicate]


Change s3 == s1 to s3.equals(s1).

The == operator or will check if they’re both the same object, rather than what their string value is.

solved Why I new the object not equal to the String? [duplicate]