Second order generics seem to behave differently than first order generics : <p>I thought I have a reasonable grasp of generics. For example, I understand why</p>

<pre><code>private void addString(List&lt;? extends String&gt; list, String s) {
    list.add(s); // does not compile
    list.add(list.get(0)); // doesn't compile either
}
</code></pre>

<p>Does not compile. <a href="https://stackoverflow.com/a/10943340/66686">I even earned some internet karma with the knowledge</a>.</p>

<p>But I'd think by the same argument this shouldn't compile:</p>

<pre><code>private void addClassWildcard(List&lt;Class&lt;? extends String&gt;&gt; list, Class&lt;? extends String&gt; c) {
    list.add(c);
    list.add(list.get(0));
}
</code></pre>

<p>Nor should this:</p>

<pre><code>private void addClass(List&lt;Class&lt;? extends String&gt;&gt; list, Class&lt;String&gt; c) {
    list.add(c);
    list.add(list.get(0));
}
</code></pre>

<p>But both compile. Why? What is the difference to the example from the top?</p>

<p>I'd appreciate an explanation in common English as well as a pointer to the relevant parts of the Java Specification or similar. </p>
