title: How to remove a value mapped to a key when a key has multiple values mapped to it in a concurrent hash map?
body: <p>I am new to concurrent hash maps and I was wondering if I could get some guidance on the <code>.remove(key)</code> method.</p>
  <p>If I have a concurrent hash map that has 1 key but several mapped values to that key, how do I go about removing that value associated with the key but not remove the key and other values associated with the key?</p>
  <p>If I have something like:</p>
  <pre><code>ConcurrentHashMap&lt;String, List&lt;String&gt;&gt; userValues = new ConcurrentHashMap&lt;&gt;();
     userValues.computeIfAbsent(user, key -&gt; new ArrayList&lt;&gt;()).add(value1);
     userValues.computeIfAbsent(user, key -&gt; new ArrayList&lt;&gt;()).add(value2);
     userValues.computeIfAbsent(user, key -&gt; new ArrayList&lt;&gt;()).add(value3);
     userValues.computeIfAbsent(user, key -&gt; new ArrayList&lt;&gt;()).add(value4);
  </code></pre>
  <p>and I print out my map I get an output along the lines of:</p>
  <pre><code>{user=[value1, value2, value3, value4]}
  </code></pre>
  <p>And I want to do something along the lines of <code>userValues.remove(value1)</code> to have a new output of <code>{user=[value2, value3, value4]}</code></p>
  <p>How do I correctly and thread-safely do what I want in the code above?</p>