title: What's the difference between List<Object> and List<?>
body: <p>Before are all you burn me alive, I must say that I have googling this question many times and I still can't understand the difference between List&lt;Object&gt; and List&lt;?&gt; </p>
  
  <p>All books I've read say that <em>in Java every class is implicitly a subclass of Object</em>. </p>
  
  <p>However I saw <a href="http://docs.oracle.com/javase/tutorial/java/generics/unboundedWildcards.html" rel="noreferrer">here</a> the follwing code: </p>
  
  <pre><code>public static void printList(List&lt;Object&gt; list) {
      for (Object elem : list)
          System.out.println(elem + " ");
      System.out.println();
  }
  </code></pre>
  
  <p>This code is wrong (intentionally for educational purposes) and according to the author the reason is: </p>
  
  <p><em>[...] prints only a list of Object instances; it cannot print <strong>List&lt;Integer&gt;, List&lt;String&gt;, List&lt;Double&gt;</strong>, and so on, because <strong>they are not subtypes of List&lt;Object&gt;</em></strong></p>
  
  <p>The solution is: </p>
  
  <pre><code>public static void printList(List&lt;?&gt; list) {
      for (Object elem: list)
          System.out.print(elem + " ");
      System.out.println();
  }
  </code></pre>
  
  <p>As you can see, the only difference is the first line:</p>
  
  <pre><code>public static void printList(List&lt;Object&gt; list) {
  public static void printList(List&lt;?&gt; list) {
  </code></pre>
  
  <p>This is the reason of my question: What's the difference between List&lt;Object&gt; and List&lt;?&gt;   ?</p>
  
  <p>After all is <em>Object</em> superclass of everything or not? </p>
  
  <p>If someone can help me with a simple explanation (I'm new with Java) I'll appreciate. </p>
  
  <p>Thank you in advance. </p>