Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有List<String[]>。我想让它按String[3]字母顺序按名称排序。对于这种情况,我的比较器应该如何?
List<String[]>
String[3]
尝试
Collections.sort(list, new Comparator<String[]>() { public int compare(String[] o1, String[] o2) { return o1[3].compareTo(o2[3]); } });