TreeMap
is a member of the Java Collections Framework. TreeMap is a reb black
tree based implementation. The map is sorted according to the
natural ordering of its keys, or by a Comparator provided at map
creation time, depending on which constructor is used.
TreeMap
performs operations like containsKey, get, put and remove in O(log
n) time.
TreeMap
is not synchronized. So in Multi threaded Environment, it must be
synchronized externally.
No comments:
Post a Comment