I had to declare my ArrayList like this:
ArrayList<MyPoint> points=new ArrayList<MyPoint>();
But my situation could be different, since I'm using my own object and I'm creating an empty, one-dimensional ArrayList. I'm not sure if that changes anything...