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