This week's book giveaway is in the Java in General forum.
We're giving away four copies of Think Java: How to Think Like a Computer Scientist and have Allen B. Downey & Chris Mayfield on-line!
See this thread for details.
Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Regarding SortedSet

 
Maddukuri Sudheer
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can some one help me wORKING WITH Sorted Collections Objects.My requirement is to sort among an unlimited objects and get the first 6 in descending Order.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You should read something about the Comparable interface and the Comparator class. Here is one tutorial :
http://www.onjava.com/pub/a/onjava/2003/03/12/java_comp.html
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic