title: Generic List not accepting subtype
body: <pre><code>public interface IRow {}
  
  public class TableA {
      public static class Row implements IRow {}
  }
  </code></pre>
  <p>Now I created a list where each element of the list contains a List of <code>IRow</code></p>
  <pre><code>List&lt;List&lt;IRow&gt;&gt; rowsOfTables = new ArrayList&lt;&gt;();
  </code></pre>
  <p>Now I want to insert first element in <code>rowsOfTables</code> which is a list holding elements of <code>TableA.Row</code>. Since I made a list of supertype/interface, so I can do this. Hence I wrote</p>
  <pre><code>rowsofTables.add(0, new ArrayList&lt;TableA.Row&gt;());
  </code></pre>
  <p><strong>But I am getting error</strong></p>
  <pre><code>Required type: List&lt;IDbRow&gt;
  Provided: ArrayList&lt;DbRow&gt;
  </code></pre>
  <p>What went wrong ?</p>
  <p><strong>EDIT:</strong></p>
  <p>Fixed by changing to this</p>
  <pre><code>List&lt;List&lt;?&gt;&gt; rowsOfTables = new ArrayList&lt;&gt;();
  </code></pre>