title: List<Integer> cannot be converted to ArrayList<Integer>
body: <p>At the beginning of my code, there is:</p>
  
  <pre><code>List&lt;List&lt;Integer&gt;&gt; result = new ArrayList();
  </code></pre>
  
  <p>And then, (here is to reverse a sub-list):</p>
  
  <pre><code>List&lt;Integer&gt; sub = new ArrayList();
  re = reverse(result.get(j)); // error occurs here
  </code></pre>
  
  <p>There is this method:</p>
  
  <pre><code>public ArrayList&lt;Integer&gt; reverse(ArrayList&lt;Integer&gt; list) {
      List&lt;Integer&gt; newList = new ArrayList&lt;&gt;();
  
      for(int i=list.size()-1; i&gt;=0; i--) {
          newList.add(list.get(i));}
          return newList;
      }
  }
  </code></pre>
  
  <p>The error message is:</p>
  
  <blockquote>
    <p>List cannot be converted to ArrayList</p>
  </blockquote>
  
  <p>Why?</p>