Every example I find is about doing this alphabetically, while I need my elements sorted by date.
My ArrayList contains objects on which one of the datamembers is a
Pass the ArrayList In argument.
private static void order(ArrayList list) { Collections.sort(list, new Comparator() { public int compare(Object o2, Object o1) { String x1 = o1.Date; String x2 = o2.Date; return x1.compareTo(x2); } }); }