Java语言的程序开发,怎么把compareTo转换为equa函数,有没有强制转换
收起
这个需要自己写一个 if (obj1.equals(obj2)) return 0; return obj1.hashcode() - obj2.hashcode();
报告相同问题?