void sortarray(final int index){
Arrays.sort(data, new Comparator<Object[]>(){
@Override
public int compare(Object[] o1, Object[] o2) {
String[] a = (String[])o1;
String[] b = (String[])o1;
return a[index].compareTo(b[index]);
}
});
}
2 5 LouieChef B
2 6 Lawson C
2 10 BakerSarah D
2 11 SmothersSally A
2 12 SillySall C
2 13 Viper B
如何对列索引的二维字符串数组进行排序。
此代码不起作用...