Map<K, V> associates unique keys with values for fast lookup. Choosing among HashMap, LinkedHashMap, TreeMap and EnumMap—and replacing verbose get/null/put boilerplate with computeIfAbsent and merge—makes aggregation code twice as clear.
More lessons in Complete Core Java