So i've created equals() method. If i want to compare 2 objects, they can only see this one. How do i get my object to use the one defined in the object class.
public boolean equals(Object object1) {
if(a == object1) {
return true;
}
else return false;
}
public static void main(String[] args) {
Compare object1 = new Compare("test");
Compare object2 = new Compare("test");
if(object1.equals(object2)
.................
}