这类问题应该是compare方法没有重写完整 建议可以重写完整 if(o1>02){return 1;} else if (o1<o2){return -1;} else{return 0;} 上述结构为从小到大排序