Hello all, I know that an ArrayList will outperform a Vector in most cases. However i would like to know the Exact situations when this happens. Here i have several situations, please let me know which amoung these 2 (Vector and ArrayList) is good in these situations. 1. When there is a lot of Random insertions and deletions 2. When Deletion and additions happen at one end of the list 3. When we only traverse through the list in an ordered way 4. When we traverese in an unordered fashion 5. When the list ourgrows the initial capacity Thanks, Sajee
Vector and ArrayList are actually very similar. The only differences I remember are that Vector is synchronized and that they have different growing behaviour. Most of your questions are more interesting for ArrayList vs. LinkedList. The JavaDoc should be able to answer most of them, though.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
And when my army is complete, I will rule the world! But, for now, I'm going to be happy with this tiny ad:
a bit of art, as a gift, that will fit in a stocking