title: Mixing nested type parameters and wildcards in Java
body: <p>Why does trying to compile</p>
  
  <pre><code>public class GenericsFail {
      public static void main(String[] args) {
          accept(new HashMap&lt;String, List&lt;String&gt;&gt;());
      }
  
      public static void accept(Map&lt;String, List&lt;?&gt;&gt; multiMap) {}
  }
  </code></pre>
  
  <p>give the error</p>
  
  <pre><code>GenericsFail.java:7: error: method accept in class GenericsFail cannot be applied to given types;
                  accept(new HashMap&lt;String, List&lt;String&gt;&gt;());
                  ^
    required: Map&lt;String,List&lt;?&gt;&gt;
    found: HashMap&lt;String,List&lt;String&gt;&gt;
    reason: actual argument HashMap&lt;String,List&lt;String&gt;&gt; cannot be converted to Map&lt;String,List&lt;?&gt;&gt; by method invocation conversion
  </code></pre>
  
  <p>The wildcard is only allowed if it's not nested inside <code>List</code>.</p>