java面试题之hashcode相等两个类一定相等吗?equals呢?相反呢?

mac2025-07-28  6

答:hashcode相等,两个类不一定相等,equals也不一定相等;

反过来,equals相等,hashcode一定相等

最新回复(0)