问题描述:

This question already has an answer here:

  • Comparator won't work with Arrays.sort

    5 answers

网友答案:

Arrays.sort expects an array. Use Collections.sort in order to sort a List.

public ArrayList<File> sort(ArrayList<File> arrayOfFiles) 
{
    Collections.sort(arrayOfFiles, new ArraySorting());
    return arrayOfFiles;
}
相关阅读:
Top