I am having trouble with an `ArrayList<Double>` function. I am trying to find out if the items within the sequence are all the same 

e.g. allSame(<7, 7, 7>) returns `true`, and allSame(<2, -4, -7>) returns `false`

This is what I've written so far but its given me an error saying it cannot find symbol - method length() and also that an array is required. :(

```
    public boolean allSame(ArrayList<Double> s)
     {
        for (int i=0; i<s.length(); i++)
          if (s[i] == s[i+1])
          return true;          }

```