sort names alphabetically - Java
sortNames
Snippet Code
To sort a list of names alphabetically.
import java.util.ArrayList;
import java.util.Collections;
ArrayList<String> names = new ArrayList<String>();
names.add("Stephen");
names.add("Albert");
names.add("Selvin");
Collections.sort(names);
Tags