pls...Anybody will summarize which collection should be used for the given .???

Thanks for your replies

This seems to be a homework.. You tell us what are your requirements, then we may provide you the Optimum way out.. But if you are asking in General. Then you should first read out the Collection ownself..

1.for uniqueness and sorted order-TreeSet 2.for uniqueness and unsorted order-HashSet 3.duplicates with sorted order-ArrayList 4.duplicates with unsorted order-LinkedList

1.for uniqueness and sorted order-TreeSet 2.for uniqueness and unsorted order-HashSet 3.duplicates with sorted order-ArrayList 4.duplicates with unsorted order-LinkedList

The elements of an ArrayList are ordered by their index, they are not however sorted.

aparna maddukuri
Greenhorn

Joined: Aug 21, 2006
Posts: 3

posted

0

I too a bit confused in writing. what was the best collection suits for "duplicates with sorted order".