From
the Javadoc for TreeSet's constructor:
Constructs a new, empty set, sorted according to the elements' natural order. All elements inserted into the set must implement the Comparable interface. Furthermore, all such elements must be mutually comparable: e1.compareTo(e2) must not throw a ClassCastException for any elements e1 and e2 in the set. If the user attempts to add an element to the set that violates this constraint (for example, the user attempts to add a string element to a set whose elements are integers), the add(Object) call will throw a ClassCastException.
You're violating the constraint I've shown in boldface: your Person class doesn't implement Comparable. If you want to use TreeSet without making Person implement Comparable, then you need to create another class that implements java.util.Comparator, and pass that to the TreeSet constructor.
[ March 01, 2007: Message edited by: Ernest Friedman-Hill ]