Suppose I have 2 equals method in the circle class,
public boolean equals(Object obj);
public boolean equals(Circle circle);
And I do this:
Circle c1 = new Circle(new Point(0, 0), 10);
Circle c2 = new Circle(new Point(0, 0), 10);
Object o1 = c1;
Object o2 = c2;
For o1.equals(c1);
why does it call the equals(Object obj)
instead of equals(Circle circle)
?