Hey guys,

I am trying to store a varying number of coordinate points in an array. So i thought of a list, and declaring this list as an arraylist using the Point class. Make sense so far? Or am i incorrect already?

In doing so i came up with this:

```
ArrayList<Point> points = new ArrayList<Point>();
Point center = new Point();
Point nextPoint = new Point();
Point prevPoint = new Point();
int numPoints = 4;
for(int i = 0; i < numPoints; i++)
{
points[i].x = r * cos(theta) + center.x;
points[i].y = r * sin(theta) + center.y;
theta += A;
}
```

What am i doing wrong here in terms of the points*.x/y*

I am getting the error: must be of type array but it is resolved to arraylist<point>

So how can i make this work? I know it's something simple... all i want to be able to do is calculate a point, then store that point in the ArrayList... should be possible right?

Any help would be appreciated!

Thanks in advance