the previous value associated with key, or null if there was no mapping for key.
(A null return can also indicate that the map previously associated null with key, if the implementation supports null values.)
As a general rule, if you don't understand the behaviour of a class or method in the core libraries, the first port of call should be the Javadocs. If they don't explain it, or if you don't understand them, then that's the time to ask on a forum. Otherwise you risk being told to RTFM .
Joined: Oct 12, 2012
Oh! Sorry!! Will read the Java docs first next time. Thanks!!