简单的有关问题弄不明白啊气愤,求教

简单的问题弄不明白啊,气愤,求教。以下程序为什么输出是0呢!public class test{int x,yvoid set(){}public

简单的问题弄不明白啊,气愤,求教。
以下程序为什么输出是0呢!
public class test 
{
  int x,y;
  void set(){}
   

   
   
public static void main(String args[])
{
test c=new test();
c.x=1;
c.y=1;

test d=new test();
d.x=1;
d.y=1;

if(c.equals(d)) System.out.println(1);
else System.out.println(0);
}

}

[解决办法]

探讨
并且两对象 也不是引用一个实例 用equals()能返回true。