title: Java - How do I add a new value to an existing key in a Hash Map. 1 key, multiple values
body: <p>I am trying to create a method that, when given a key and a value, can access the map via the key and then either add or replace that specific value.
  My Hash Map is created like so:</p>
  
  <pre><code>public Band(){
      musicians = new HashMap&lt;&gt;();
  }
  </code></pre>
  
  <p>And I can add new entries like so, with band acting as the key:</p>
  
  <pre><code>public void addMapEntry(String band, String name, String instrument, int experience){
      musicians.put(band, new Musician(name, instrument, experience));
  }
  </code></pre>
  
  <p>My new method header look like this:</p>
  
  <pre><code>public void addValue(){ }
  </code></pre>
  
  <p>I have tried using the put method but I can't get it work as I'd like.
  I have also tried iterating through the map, but I've only ever used that method to return map objects in a list, whereas I don't want to return anything in this method. I want to be able to send it two arguments (the key and the value) and have it only replace that specific value.</p>
  
  <p>I hope I have been clear in my explanation.</p>