Hi, does anyone know an example where HashMaps don't ensure iteration order in their keys? Meaning for {1=2,2=3,3=4}, if we iterate the entrySet() or keySet(), we are not guaranteed to get the order of 1,2,3 according to them. However, I cannot find a time where the order isn't ensured.
if the order can be changed, and instead I use LinkedHashMap which somewhat ensures that order, if I'm going to iterate via keySet() and entrySet() again, how does Java ensure that these methods also turn out ordered?
(see full text)