Two Laptop Bag*
The moose likes Java in General and the fly likes Collections Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Collections" Watch "Collections" New topic
Author

Collections

Angela D'souza
Ranch Hand

Joined: Jan 16, 2002
Posts: 469
Which class will you use to create a collection of unique and sorted Objects?
Thanks,
Angela
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60765
    
  65

Perhaps TreeSet which implements the SortedSet interface will suit your needs.
hth,
bear


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Jamie Robertson
Ranch Hand

Joined: Jul 09, 2001
Posts: 1879

Originally posted by Angela D'souza:
Which class will you use to create a collection of unique and sorted Objects?
Thanks,
Angela

Have a read on Sun's tech tips for SortedSets. It gives you some explanations and examples on SortedSets.
Jamie
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Collections
 
Similar Threads
WA #1.....word association
Garbage collection - arrays
Collections
Collections
Collections