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
Printable View
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
You can use the Sort class and use its quicksort
method.
Kannan
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