Hi, you could investigate the java.util.Arrays or java.util.Collections APIs. They have various methods for performing sorting on arrays or lists. I tried the following code:
When run under windows, the File is already sorted for you, but when run under Unix I needed to add the call to Arrays.sort(Object). If the desired sorting isn't what you are after then you will have to define your own custom sorting by implementing Comparator and calling something like Arrays.sort(Object myArray, Comparator myComparator). James.
Joined: Nov 16, 2000
Thanks for your reply. I got the alphabetically sorted list by using Arrays.sort(Object) Thanks again