I want to sort my arraylist alphabetical but I don\'t get it...maybe you can help me. I dont know why but i cant work with collections.sort...what am i coding wrong? thanks a l
You have to implement your own Comparator<HashMap<String,String>>
and pass it to Collections.sort
.
Use Collections.sort
Collections.sort(listOfStrings, String.CASE_INSENSITIVE_ORDER);
See the following for details:
String.CASE_INSENSITIVE_ORDER
Collections.sort
You can also create a custom Comparator, instead of using String.CASE_INSENSITIVE_ORDER