title: How to use hashmap.put without overriding the previous data? (java)
body: <p>I have something along the lines of this:</p>
  
  <pre><code>public HashMap&lt;Boolean, String&gt; map = new HashMap();
  map.put(this.inverted, "Inverted");
  map.put(this.active, "Loading");
  System.out.println(map.size());
  </code></pre>
  
  <p>after seeing that the size was always 1, I realised that using map.put was overriding the previous data. I am currently trying to iterate over the hashmap. Is there a way to add mappings to it without overriding previous ones?</p>