In Java I have List<String[]> myList and I would like to be able to sort it in various ways. For example sort it by row[0], or maybe row[0] and then by row[1], etc, where row[i] is the String[] at index i.
Can this be done or does Java not support it?
List<String[]> list = ... ; list.sort(Comparator.comparing(a -> a[2]));