Category Archives: TreeMap

Iterate/ loop TreeMap collection of String Objects before & after java8 (example)

1. What is TreeMap collection in java? Given a TreeMap  collection containing key value pairs. TreeeMap is Red-Black tree based NavigableMap implementation. The map is sorted according to the natural ordering of its keys, or by a Comparator provided at map creation time Guaranteed time complexity log(n)  for the containsKey, get, put and remove operations.… Read More »