Skip to content

Map

  • Map - classes HashMap LinkedHashMap TreeMap

    • clear()
    • containsKey(key)
    • containsValue(value)
    • get(key) - give value associated with key
    • isEmpty()
    • put(key, value)
    • remove(key)
    • putIfAbsent(key, value) - set value only if key is not present
  • HashMap unordered

  • TreeMap LinkedHashMap - ordered