对象赋值都是按着地址赋值。。。具有相同的hash code
package experiment;
public class object{
public String a ;
object(){
}
}
package experiment;
public class experiment1 {
public static void main(String[] Zing) {
object a = new object();
object b = new object();
object c = a;
b = a;
a.a = "nima";
b.a = "caonima";
System.out.println(a);
System.out.println(b);
System.out.println(c);
System.out.println(a.a);
System.out.println(b.a);
System.out.println(c.a);
}
/**ending:
experiment.object@279f2327
experiment.object@279f2327
experiment.object@279f2327
caonima
caonima
caonima
*/
}