import java.util.*; public class SortTestProgram { public static void main(String args[]) { ArrayList people = new ArrayList(); people.add(new Person("Pete Zaria", 12)); people.add(new Person("Rita Book", 20)); people.add(new Person("Willie Maykit",65)); people.add(new Person("Patty O'Furniture", 41)); people.add(new Person("Sue Permann", 73)); people.add(new Person("Sid Down", 19)); people.add(new Person("Jack Pot", 4)); Collections.sort(people); // do the sorting for (Person p: people) System.out.println(p); } }