HashSetVSTreeSetVSLinkedHashSet
Last updated
Was this helpful?
Last updated
Was this helpful?
In brief, if you need a fast set, you should use HashSet; if you need a sorted set, the TreeSet should be used; if you need a set that can be store the insertion order, LinkedHashSet should be used.