public boolean equals(Object o)
{
boolean result = false;
if(o!=null && o instanceof Person)
{
Person anotherperson = (Person) o;
if(this.getName() == anotherperson.getName() && this.getCal() == anotherperson.getCal())
{
result = true;
}
}
return result;
}
public int hashCode()
{
return getName().hashCode() ^ getCal().hashCode();
}
} /////////////////////// what I need to happen is the equal method will compare if the inputed values are identical or not identical, right now it shows not Identical no matter what I change, It seems theres a problem comapring 2 objects in boolean equals.