title: Generic: why use "class A <E extends Superclass>" in stead of "class B<Superclass>"?
body: <p>I am experimenting with Java generics. I understand with Java generics we can create class and methods which only deals with specific types. This enable detection of programming error at compile time. </p>
  
  <p>My question may sounds strange.  Why use <code>E extends Superclass</code> instead of <code>Superclass</code>? Please take a look at the code below.</p>
  
  <pre><code>class Hunter &lt;E extends Animal&gt;{}
  
  class Keaper &lt;Animal&gt;{}
      /*edit: as AR.3 and other pointed out, Keaper&lt;Animal&gt; is the same as Keaper&lt;E&gt;.
   Animal  is just a type parameter here*/
  
  class Animal{}
  
  class Cat extends Animal{}
  
  class Dog extends Animal{}
  
  
  public class TestGeneric {
      public static void main(String[] args) {
          Hunter&lt;Cat&gt; hunter1 = new Hunter&lt;&gt;();
          Hunter&lt;Dog&gt; hunter2 = new Hunter&lt;&gt;();
          Hunter&lt;Animal&gt; hunter3 = new Hunter&lt;&gt;();
  
          ArrayList&lt;Hunter&gt; hunters=  new ArrayList&lt;&gt;();
          hunters.add(hunter1);
          hunters.add(hunter2);
          hunters.add(hunter3);
  
          Keaper&lt;Cat&gt; keaper1 = new Keaper&lt;&gt;();
          Keaper&lt;Dog&gt; keaper2 = new Keaper&lt;&gt;();
          Keaper&lt;Animal&gt; keaper3 = new Keaper&lt;&gt;();
  //Edit: as AR.3 and others pointed out, Keaper&lt;String&gt; is also legal here.
  
          ArrayList&lt;Keaper&gt; keapers=  new ArrayList&lt;&gt;();
          keapers.add(keaper1);
          keapers.add(keaper2);
          keapers.add(keaper3);
      }
  }
  </code></pre>
  
  <p>I feel <code>E extends Animal</code> is almost the same as <code>Animal</code>, except the first one may provide more information. Any idea?</p>