title: Generic Types ("List<? extends> " ) in HashMap's Value
body: <p>I did a generic type test. </p>
  
  <pre><code>class A {}
  class B extends A {}
  </code></pre>
  
  <p>there are two methods:</p>
  
  <pre><code>private static void extendTest(List&lt;? extends A&gt; superList) {
      System.out.println("extendTest over.");
  }
  
  private static void extendMapTest(HashMap&lt;String, List&lt;? extends A&gt;&gt; superMap) {
      System.out.println("extendMapTest over.");
  
  }
  </code></pre>
  
  <p>and I create a <code>list</code> and a <code>map</code>:</p>
  
  <pre><code>List&lt;B&gt; childList = new ArrayList&lt;&gt;();
  childList.add(new B());
  extendTest(childList); // TAG1: it is OK.
  
  HashMap&lt;String, List&lt;B&gt;&gt; childMap = new HashMap&lt;&gt;();
  childMap.put("hello", childList);
  extendMapTest(childMap);  // TAG2: ERROR!
  </code></pre>
  
  <p>why TAG1 is OK, and TAG2 is error?
  how can I correct TAG2?</p>