title: Java wildcard difference in 7 and 8
body: <p>I have the following code, which works fine on Java 8:</p>
  
  <pre><code>List&lt;Class&lt;?&gt;&gt; KEY_NAME_CLASSES = Collections.singletonList(String.class);
  </code></pre>
  
  <p>But when I try to use the Java 7 compiler, I get an error:</p>
  
  <pre><code>incompatible types: java.util.List&lt;java.lang.Class&lt;java.lang.String&gt;&gt; cannot be converted to java.util.List&lt;java.lang.Class&lt;?&gt;&gt;
  </code></pre>
  
  <p>Why? Is there some way to use such wildcards in Java 7?</p>