I have a List of Objects like List p.I want to sort this list alphabetically using Object name field. Object contains 10 field and name field is o
List p
something like
List theList = … ; Collections.sort (theList, new Comparator () { int compare (final FancyObject a, final FancyObject d) { return (a.getName().compareTo(d.getName())); }});