title: Inheritance in constructors
body: <p>My question largely relates to this one <a href="https://stackoverflow.com/questions/2745265/is-listdog-a-subclass-of-listanimal-why-arent-javas-generics-implicitly-p">Is List&lt;Dog&gt; a subclass of List&lt;Animal&gt;? Why aren&#39;t Java&#39;s generics implicitly polymorphic?</a></p>
  
  <p>So, say we have Animal that is a super interface of Cat and Dog. We also have a abstract class Litter such that</p>
  
  <pre><code>public abstract class Litter{
  
      public Litter(Collection&lt;Animal&gt; animals){}
  }
  </code></pre>
  
  <p>And then we naturally have a concrete class KittyLitter</p>
  
  <pre><code>public class KittyLitter extends Litter{
  
      public KittyLitter(Collection&lt;Cat&gt; animals) {
          super(animals);
      }
  }
  </code></pre>
  
  <p>...and puppy litter.</p>
  
  <p>Naturally, we want to limit all Animal in a KittyLitter to just Cat. Why doesnt Java allow us to do this? Then, also lets say we add another method -- </p>
  
  <pre><code>public abstract void addCub(Animal animal);
  </code></pre>
  
  <p>and concrete implementation in KittyLitter of</p>
  
  <pre><code>@Override
  public void addCub(Animal cat) {
      // TODO Auto-generated method stub
  }
  </code></pre>
  
  <p>At this point this breaks logic and allows us to insert a Dog into a KittyLitter which makes no sense. Any ideas as to why Java does these things to us? Also, if KittyLitter constructor can be changed to accept a List, why does the type argument behave differently? Can anyone explain why this is so?</p>
  
  <p>EDIT: this is really not about constructors, but also any method that overrides.</p>