Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Collections.sort vs TreeSet

mohitanchliaJun 24 2008 — edited Jun 29 2008
Which one is more efficient Collections.sort(List<>, comparator) or TreeSet(comparator) ? Or does it even matter. I was thinking Collections.sort is more efficient because it needs to sort only when it's asked to do so.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 27 2008
Added on Jun 24 2008
14 comments
2,356 views