Collections.sort(marvel, new Comparator<String>() { @Override public int compare(String hero1, String hero2) { return hero1.compareTo(hero2); } });