in JAVA by
Q:

Difference between HashSet and TreeSet.

Difference between HashSet and TreeSet can be seen below:

HashSet TreeSet
Inserted elements are in random order Maintains the elements in the sorted order
Can able to store null objects Couldn’t store null objects
Performance is fast Performance is slow

Related questions

0 votes
asked May 24, 2019 in JAVA by rajeshsharma
...