This discussion is archived
2 Replies Latest reply: Oct 12, 2012 5:20 AM by gimbal2 RSS

What's the difference between Map, HashMap, List, ArrayList and Vector?

967952 Newbie
Currently Being Moderated
I'm trying to figure out what the real differences are between the different objects and when to use what. Anyone care to enlighten me? It seems that most of them do the same thing; let me create a list of objects that I can iterate through, add or remove objects from the lsit etc. So why are there so many different ways to do this?
Personally, I seem to use HashMap very often, and maybe I'm overusing it when another could be more effective (from a memory-usage point or cpu-performance point).

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points