class A
{
int i =0;
public void hello()
{
System.out.println("hello");
}
}
class My
{
public static void main(String[] args)
{
A a = new A();
A b = new A();
boolean bool;
bool = a.equals(b);
System.out.println(bool);
}
}
为什么打印出来的却是false呢?
引用a,b 的内容是完全一样的呀?
请您指点!
请您看好问题再答,就我这个例子而言,请不要用String来解释,谢谢