排序遇到问题 JDK7的Comparison method violates its general contract

图解JDK7的Comparison method violates its general contract异常

楼主分析的很详细,能力有限,我看得迷迷糊糊的,不过大致知道这个错误的起因了。学习了,谢谢!

以后就记着,java7下,实现compare方法必须有一个返回0的情况。

jdk 7下排序需注意。

http://blog.2baxb.me/archives/993

记录,待续...

上一篇:java-collections.sort异常Comparison method violates its general contract!


下一篇:JDK7的Comparison method violates its general contract异常