C
C
click_f2016-10-25 15:23:46
Java
click_f, 2016-10-25 15:23:46

How to remove one value from linkedHashMap?

When we add a new element to the linkedHashMap with a key that already exists in the map, they form a chain.
Question: How can I remove only one element from a given chain?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
zerninv, 2016-10-26
@zerninv

When we add a new element to the linkedHashMap with a key already existing in the map, they form a chain

No, the new value overwrites the old one. Removed: map.remove(key).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question