阅读背景:

为什么Object.hashCode()不为看似相同的对象返回相同的值

来源:互联网 

The code is as following:

代码如下:

public class Main {
    public static void main(String[] args) {
        Student a = new Student(10, "Ole");
        Student b = new Student(10, "Ole");

        System.out.println(a.hashCode());
        System.out.println(b.hashCode());
    }
}
public clas



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: