Win a copy of Penetration Testing Basics this week in the Security forum!

# Regarding Collections

Mani Venkata Kanth
Ranch Hand
Posts: 39
hi,

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

Praveen Babu
Ranch Hand
Posts: 138
Well, what are the requirements ?

Shaan Shar
Ranch Hand
Posts: 1249
Originally posted by k pandu:
hi,

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

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..

Check out this link to get hands-on on Collection

1. Java Collection

2. Core JAVA Collections

3. Performance of Collections

Hope this helps you.

Mani Venkata Kanth
Ranch Hand
Posts: 39
which collections are suitable for the following requirements...

1.for uniqueness and sorted order
2.for uniqueness and unsorted order
3.duplicates with sorted order
4.duplicates with unsorted order

Shaan Shar
Ranch Hand
Posts: 1249
Originally posted by k pandu:
which collections are suitable for the following requirements...

1.for uniqueness and sorted order
2.for uniqueness and unsorted order
3.duplicates with sorted order
4.duplicates with unsorted order

Seems to be a homework exercise.. At every page of Collections they have clearly mentioned which to be use according to condition given by you...

Take a look on the links I have mentioned for you..... There you will be get clear picture.

Greenhorn
Posts: 3
I think this might solves u'r doubt

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

bing marquez
Greenhorn
Posts: 11

I think this might solves u'r doubt

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