Map<String,String> map = new TreeMap<String,String>(); map.put("Belorusia", "Minsk"); map.put("Ukraine", "Kiev"); map.put("Russia", "Moskva"); map.put("Iralia", "Rim");
treemap
to store all values alphabetically, without preserving the order in which the elements were put, but how to sort the map values against the alphabet? I do not remember exactly, but this method was used:
Map<String,String> map = new TreeMap<String,String>
(// Here we wrote something, maybe something related to iterable
)
When the output card was sorted against the alphabet? What code can be used in brackets?