多项选择题
class A
{
int x,y;
int add()
{
return x+1;
}
public boolean equals(Object obj)
{
A that=(A)obj;
if (this.x==that.x)
return true;
return false;
}
}
A a=new A();
A b=new A();
a.x=6;
a.y=10;
b.x=6;
b.y=9;
以下选项中,结果为true的是( )。
A、a.x==b.x
B、a.y==b.y
C、a.equals(b)
D、a==b