title: How to inherit Generic types
body: <p>I have two packages and both packages have Excel classes and also Invoices and Packing classes, I would like to create one Excel where i could extend from ,each excel need to know about Invoice and Packing Lists</p>
  
  <pre><code>public class Excel {
  
     protected final List&lt;? extends T&gt; invoices;
     protected final List&lt;? extends T&gt; packing;
  
     public Excel(List&lt;? extends T&gt; invoices, List&lt;? extends T&gt; packing) {
        this.invoices = invoices;
        this.packing = packing;
     }
  }
  </code></pre>
  
  <p>I have extended that Excel in another Excel class and in the constructor <code>super(invoices,packing)</code> it says required type List ? extends T provided List Invoices List Packing</p>
  
  <pre><code>public Excel(List&lt;Invoice&gt; invoices, List&lt;PackingList&gt; packingLists) {
      super(invoices,packingLists);
  </code></pre>