HashMap: It is unordered, unsorted map. HashMap allows one 'null' values in a collection.
Hashtable: It is same as HashMap but it does not allow null either in keys and values.
LinkedHashMap: It takes insertion order. It is slower than HashMap for adding,deleting but faster iteration
TreeMap: It is a SortedMap. Like TreeSet, TreeMap can define a custom Sort using Comparator or Comparator
No comments:
Post a Comment