I have a LinkedHashMap and I want to sort its keys (which are Strings) alphabetically. However, it won't work with the Collections.sort() method, because it won't take either the LinkedHashMap itself nor the LinkedHashMap's keyset.
My only option is to sort them manually while filling the LinkedHashMap, but before doing that I wanted to know if anyone knows a better way.