|
-
March 3rd, 2000, 09:42 AM
#1
How to sort objects within a Vector?
Hallo!
Can someone tell me how to sort the objects in a vector?
Do I have to implement a QuickSort, BubbleSort, etc. to do this or is there a nice way in Java?
Kind regards,
Jochen, Germany
-
March 3rd, 2000, 02:25 PM
#2
Re: How to sort objects within a Vector?
You can use the Sort class and use its quicksort
method.
Kannan
-
March 3rd, 2000, 02:46 PM
#3
Re: How to sort objects within a Vector?
I don't know what exactly your doing, but you may want to consider looking at the Collections package. If you use TreeSet or TreeMap (which operate much like Hashtable) then the entries are automatically sorted according to the key.
Dustin
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|