title: Initialize List<List<Integer>> in Java
body: <p>How can I initialize <code>List&lt;List&lt;Integer&gt;&gt;</code> in Java? </p>
  
  <p>I know <code>List</code> is an interface and I can use <code>ArrayList</code> or <code>LinkedList</code> to implement <code>List&lt;Integer&gt; list = new ArrayList&lt;Integer&gt;()</code>, but when I initialize <code>List&lt;List&lt;Integer&gt;&gt; list = new ArrayList&lt;ArrayList&lt;Integer&gt;&gt;();</code> I get error incompatible types:</p>
  
  <pre><code>ArrayList&lt;ArrayList&lt;Integer&gt;&gt; cannot be converted to List&lt;List&lt;Integer&gt;&gt;.
  </code></pre>
  
  <p>So how can I proceed?</p>