title: cannot invoke get int on the array type comparable[ ]
body: <p>I'm writing a method for finding whether an array has duplicates. I ran into some problem with the equals method, error at the bold line. Any adjustments I can make?</p>
  
  <p>Here's some of my partial code:</p>
  
  <pre><code>  public boolean duplicate(){
        for (int i=0; i&lt;data.length; i++){
            for (int j=i+1; j&lt;data.length; j++){
                **if (data.get(i).equals(data.get(j)){**
                    return true;
                }
            }
        }
        return false;
    }
  </code></pre>