Java Collection Framework – The TreeSet - TopicsExpress



          

Java Collection Framework – The TreeSet Class --------------------------------------------------------------------------------- The TreeSet is another popular implementation of Set interface. HashSet doesn’t maintain any order where as LinkedHashSet maintains insertion order. The main difference between these two implementations and Treeset is, elements in TreeSet are sorted according to supplied Comparator. You need to supply this Comparator while creating a TreeSet itself. If you don’t pass any Comparator while creating a TreeSet, elements will be placed in their natural ascending order. See more at : javaconceptoftheday/java-collection-framework-treeset-class/
Posted on: Wed, 21 Jan 2015 04:19:58 +0000

Trending Topics



Recently Viewed Topics




© 2015