title: Java generic parameters and inheritance
body: <p>supposed we know that ViewGroup extends View. <br>
  Further we have a generic, parametrized <code>class A&lt;T extends View&gt;</code></p>
  
  <p><strong>Question:</strong><br> Why wont method <code>C.add()</code> accept <code>new A&lt;ViewGroup&gt;()</code> as parameter? <br>
  Shouldn't it work, because of polymorphism?</p>
  
  <p><img src="https://i.stack.imgur.com/Sy9gV.png" alt="Class diagram"></p>
  
  <p><strong>SOLUTION:</strong>
  Singning add with <code>? extends View</code> lets add accept <code>new A&lt;ViewGroup&gt;()</code> as a parameter.</p>
  
  <p><img src="https://i.stack.imgur.com/6zWq9.png" alt="Solution"></p>