title: java errors in dr java
body: <p>I added <code>import java.util.ArrayList;</code> (<a href="https://stackoverflow.com/questions/5461395/java-error-code">per suggestions here</a>) to my code and then I got 2 different kinds of errors. They are:</p>
  
  <pre><code>error: the type of the expression must be an array type but it resolved to java.util.ArrayList&lt;java.lang.Integer&gt;
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>error: length cannot be resolved or is not a field.
  </code></pre>
  
  <p>Can anyone tell me what they mean? I've tried changing the length statements by adding <code>()</code> at the end but that cause more errors then I started with. </p>