Override


class GeoObj {}
class Circle1 extends GeoObj {
    double radius;
    public Circle1(double r) {radius = r;}
    public boolean equals(Circle1 c) {return radius == c.radius;}
}
class Circle2 extends GeoObj {
    double radius;
    public Circle2(double r) {radius = r;}
    public boolean equals(Object o) {return radius == ((Circle2)o).radius;}
}
public class Override {
    public static void main(String[] args) {
	Circle1 c1 = new Circle1(8.);
	Circle2 c2 = new Circle2(8.);
	Circle1 c3 = new Circle1(8.);
	GeoObj  g1 = new Circle1(8.);
	GeoObj  g2 = new Circle2(8.);
	System.out.println(c1.equals(c3));
	System.out.println(c1.equals(g1));
	System.out.println(c2.equals(g2));
    }
}
  
  
allan gottlieb