title: Java generics extend
body: <p>let's say I have :
  <code>public class Animal{..}</code></p>
  
  <p>and <code>public class Cat extends Animal {...}</code></p>
  
  <pre><code>public MakeNoise(Class&lt;? extends Animal&gt; animal1,
                   Class&lt;? extends Animal&gt; animal2){..}
  </code></pre>
  
  <p>why does <code>MakeNoise(new Animal(),new Animal())</code> doesn't compile?</p>
  
  <p>while <code>MakeNoise(new Cat(),new Cat())</code> does compile.</p>
  
  <p>is there any way to solve it without adding interface to animal and do:</p>
  
  <pre><code>Class&lt;? extends AnimalInterface&gt;
  </code></pre>