|
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.
|