Thread: sort arrays
View Single Post
Old 04-03-2003, 12:52 AM   #2 (permalink)
joe_bruin
LOAD "*",8,1
 
Join Date: Feb 2003
Location: la.ca.us
Posts: 254
joe_bruin is on a distinguished road
sorting is one of the classic problems of computer science. if you want to implement a sort yourself, i suggest you google for "quicksort" or "mergesort".
java, however, provides some nice tools that will do the job for you. you could put the strings into a Vector, SortedMap, or one of several other structures provided by the java class library, that can do the sorting for you. hint: look at the Comparable interface.
joe_bruin is offline   Reply With Quote