Sort ArrayList of Array in Java

后端 未结 7 1079
感动是毒
感动是毒 2020-11-29 09:20

What is the best way to sort an ArrayList in Java?

Where String[] is...

String[] = new String[] { \"abc\", \"abc\", \"ab         


        
7条回答
  •  死守一世寂寞
    2020-11-29 09:54

    You write a Comparator that compares two String[] by the correct child, and then you pass it to Collections.sort(List list, Comparator c).

提交回复
热议问题