1import java.util.ArrayList;
2import java.util.Collections;
3import java.util.List;
4
5public class StringSorter {
6
7 public static void main(String[] args) {
8 List namesList = new ArrayList();
9 namesList.add("Top language");
10 namesList.add("Happy programming !");
11 namesList.add("Java");
12 namesList.add("HackTrack");
13 Collections.sort(namesList);
14 System.out.println(namesList);
15