data structure in java

* ArrayList is not synchronized. Vector is synchronized.
* All the three classes implement the Map interface and offer mostly the same functionality. The most important difference is the order in which iteration through the entries will happen:
    * HashMap makes absolutely no guarantees about the iteration order. It will even change completely when new elements are added.
    * TreeMap will iterate according to the "natural ordering" of the keys according to their compareTo() method (or an externally supplied Comparator). Additionally, it implements the SortedMap interface, which contains methods that depend on this sort order.
    * LinkedHashMap will iterate in the order in which the entries were put into the map
* In Java, the set has its implementation in various classes such as HashSet, TreeSet and LinkedHashSet.
    * HashSet stores elements in random order    
    * LinkedHashSet stores elements according to insertion orde
    * TreeSet stores according to natural ordering.