Collections.sort(cInd, new Comparator() { int compare(Object o1, Object o2) { Person a = (Person)o1; Person b = (Person)o2; return a.getLastName().compareTo(b.getLastName()); } });