Extreme Java When vanilla Java is not enough


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:

  1. Vector is thread-safe, ArrayList isn't;
  2. ArrayList supports null items;
  3. Vector's enumerations are not fail-fast; and
  4. You can pass the capacity increment to Vector's constructor.

Filed under: Java SE Leave a comment
Comments (0) Trackbacks (0)

No comments yet.

Leave a comment



No trackbacks yet.