Results 1 to 3 of 3
Thread: Collections Sort
- 06-03-2008, 04:45 PM #1
Member
- Join Date
- Jun 2008
- Posts
- 1
- Rep Power
- 0
- 06-03-2008, 05:00 PM #2
Nobody is going to write it for you but I'll give you some ideas. Put your objects into a vector and make sure that you have a method in your class for that object that has the comparable method, which tells how to compare the object. I think but could be wrong pass in the vector into Arrays.sort or there might be vector.sort, look in the api that should do it for yeah.
My IP address is 127.0.0.1
- 06-04-2008, 08:11 AM #3
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
You can have vector sort for this.
Similar Threads
-
How to sort a list using Bubble sort algorithm
By Java Tip in forum AlgorithmsReplies: 3Last Post: 04-29-2008, 08:04 PM -
Simple demonstrations of the Collections utilities
By Java Tip in forum java.langReplies: 0Last Post: 04-16-2008, 10:39 PM -
Collections framework
By yuvi461 in forum New To JavaReplies: 2Last Post: 01-08-2008, 10:46 AM -
Performance Of Collections
By thomasprabu in forum Advanced JavaReplies: 0Last Post: 01-05-2008, 11:17 AM -
how to sort
By Feng in forum New To JavaReplies: 1Last Post: 11-20-2007, 06:56 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks