tareq3
2/27/2019 - 8:31 AM

Map

Map: It holds element as key , value pairs in generic

HashMap:

  • only unique keys not unique values
  • Random elements order

LinkedHashMap:

  • sorted according to insertation order

TreeMap

  • TreeMap is sorted according to values

HashTable:

  • For thread safety we use hashTable instead of hashMap