Set<String> set = new TreeSet<String>(new Comparator<String>() { public int compare(String one, String other) { // implement } });
- TreeSet sorts the order and don't accept null