6Apr/110
Differences between ArrayList and Vector
Last friday, I posted the differences between HashMap and Hashtable. Studying a little more, I decided to checkout the differences between ArrayList and Vector. Surprise! The same three items, plus one bonus:
- Vector is thread-safe, ArrayList isn't;
- ArrayList supports null items;
- Vector's enumerations are not fail-fast; and
- You can pass the capacity increment to Vector's constructor.