HashSet vs TreeSet

Tutorials Shared by the Internet Community

Advertisements


Synopsis

HashSet and TreeSet are the leaves of the same branch , in java words they both implements the Set interface.

Statistics

  • Total Hits - 11327

  • Total Votes - 15 votes

  • Vote Up - 11 votes

  • Vote Down - 4 votes

  • Domain - javahungry.blogspot.com

  • Category - JAVA/Collections

  • Submitted By - Java Hungry

  • Submitted on - 2014-04-02 06:17:47

Description

The difference between HashSet and TreeSet is a popular interview question in java although it is not as popular as Arraylist vs Vector or Comparable vs Comparator but still can not be missed.
In this article we will see difference between HashSet and TreeSet ,as well as similarities and their examples ...


Site  |   Broken  |   Tweet  |   Facebook  |     |   Save  |   Liked  |   Down

Advertisements