I constructed a class with one String field. Then I created two objects and I have to compare them using == operator and .equals() too
String
==
.equals()
Statements a == object2 and a.equals(object2) both will always return false because a is a string while object2 is an instance of MyClass
a == object2
a.equals(object2)
false
a
string
object2
MyClass