I have a simple question about a java map.Suppose I have a map that has a key and value already set. How do I change the value of that key; what method would I use?
Just call a normal put -- it will replace the existing value for the key. If you need to access the old value for that key, the put method returns it.
See the javadoc for more details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With