I have a fixed set of key value pairs with which I am initializing the LinkedHashMap<String, Double>.
Does the insertion order remain the same when I do a
LinkedHashMap.put(existingKey, newValue);
To be precise my question is, when we update a value for a key using the put
method, is the order of initial insertion disturbed??
If so 1) why? 2) How can I prevent this to preserve the initial order of insertion?
I chose LinkedHashMap because, I wanted a collection that supports a key value pair and maintains the the insertion order.
TIA