How do you read the contents of a file into an ArrayList in Java?
ArrayList
Here are the file contents:
cat ho
Add this code to sort the data in text file. Collections.sort(list);
Collections.sort(list);