I have a String array:
String
String[] str = {\"ab\" , \"fog\", \"dog\", \"car\", \"bed\"}; Arrays.sort(str); System.out.println(Arrays.toString(str
Here you can find usefull link:
Using comparator to make custom sort
In your example instead comparing specific attributes of class you nedd to check possition of char in benchmarked String and base on this check if it's greather/equal/smaller.