Arrays.sort(copied, new Comparator<float[]>(){
@Override
public int compare(float[] o1, float[] o2) {
// TODO Auto-generated method stub
return o2[7].compareTo(o1[7]);
}
});
复制的数组使用看起来像这样
[10.0, 34.34, 34.42, 34.1, 34.35, 5244700.0, 34.35, 0.0, 0.0, 0.0][10.0, 34.34, 34.42, 34.1, 34.35, 5244700.0, 34.35, 0.1, 0.0, 0.0 ].......
但不知何故,编译器错误返回行:
Cannot invoke compareTo(float) on the primitive type float
请帮忙