title: How to use an instance initializer with a generic HashMap?
body: <p>Can you use an instance initializer with a generic HashMap?</p>
  
  <p>I found this code online, but am having trouble converting it to a generic HashMap instead of a basic HashMap:</p>
  
  <pre><code>someMethodThatTakesAHashMap(new HashMap(){{put("a","value-a"); put("c","value-c");}}); 
  </code></pre>