I have this hashmap:
HashMap<String, ArrayList<String>> allhotels = new HashMap<>();
I want to sort all the values in each Arraylist alphabetically. This is my current method:
public void sortHotels() {
for(int i = 0; i < allhotels.size(); i++) {
Collections.sort(allhotels.values().toArray(), String.CASE_INSENSITIVE_ORDER);
}
}
I want to sort the strings in the ArrayList for every entry in the hashmap.