Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sorting Alphabetically Help

Status
Not open for further replies.

MaxGeek

Technical User
Jan 8, 2004
52
US
I would like to sort some class objects alphabetically and want to know if there is an easy way to do it.

I have classes like Person.class which has variables like:
int id
String name
(Getters and setters for both)

Then I have a hashSet of Person.class objects and I want to return them sorted alphabetically.

Is there a relatively simple way to do this?

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top