I have an ArrayList and I would like to sort the contents so that anything with English alphabets are sorted first and then anything with numbers and non English characters are sorted last.
For example: A, B , C ... Z, 1 , 2, 3 ... 9, _test1,_2, ...
Currently I only know how to sort items in alphabetical order. Suggestions?
class Comparator implements Comparator<Name> {
@Override
public int compare(Name name1, Name name2) {
return name1.getName().toLowerCase().compareTo(name2.getName().toLowerCase());
}
}