可以通过hashCode比较对象,hashCode如果重写的话 返回的内存地址是一样的 则不能创建对象 转载于:https://www.cnblogs.com/classmethond/p/9962334.html