Tuesday, 20 January 2015

Difference between TreeSet and TressMap

TreeSet and TreeMap are two different Collection class in java.TreeSet implements Set interface whereas TressMap impements Map interface.

                                                     TreeSet Vs TreeMap



 It implements Set interface.
 It implements Map interface.
 Storing Objects 

 TressSet stores only one objects.
 TreeMap stores two objects i.e.key and value.

 TreeSet does not allow duplicates value.
 TreeMap allows duplicate values.

 Specific Implementation
 It implements NavigableSet.
 It implements NavigableMap.

Study Well.Enjoy Reading.

No comments:

Post a Comment