Next page | Contents page |

Exercise 17 - sorted lines

Modify the TextFileReader from Exercise 16 so that it outputs the lines in alphabetically sorted order.


  1. You do not know how many lines there are going to be in the file.
  2. java.util.Collections has a static method you could use for sorting. Notice how the API documentation uses a parametric type, <T>.
Next page | Contents page |