title: When to use wildcards in Java Generics?
body: <p>this is from <strong>HeadFirst Java</strong>: ( page 575 ) </p>
  
  <p>This:</p>
  
  <pre><code>public &lt;T extends Animal&gt; void takeThing(ArrayList&lt;T&gt; list)
  </code></pre>
  
  <p>Does the same thing as this:</p>
  
  <pre><code>public void takeThing(ArrayList&lt;? extends Animal&gt; list)
  </code></pre>
  
  <p>So here is my question: if they are exactly same, why don't we write</p>
  
  <pre><code>public &lt;? extends Animal&gt; void takeThing(ArrayList&lt;?&gt; list)
  </code></pre>
  
  <p>or</p>
  
  <pre><code>public void takeThing(ArrayList&lt;T extends Animal&gt; list)
  </code></pre>
  
  <p>Also, when would it be useful to use a ? instead of a T in a method declaration ( as above ) with Generics, or for a Class declaration? What are the benefits? </p>