This is just a case of using the right methods - the
API is always a good place to start.
In this case I'd use keySet() or valueSet() from the Map class, then convert to an array and sort (using methods from Set and Arrays respectively).
Elements of a Set are by definition distinct - assuming you define 'distinct' based on the equals() method.
-Tim
[ April 26, 2004: Message edited by: Tim West ]