How can I get the coordinate of one shape

Ok it makes more sense now.

Short answer, you don’t have property like this. The reason is ellipse is not an object but simply a function that draws something on the canvas.

But of course, you have several way to achieve what you want to do.
The simplest way would be to have 2 arrays holding your x and y coordinates. Actually you can have a look at this thread; this solution is implemented there (and I would not be surprised if you both have the same assignement =)

If you want to be a tiny bit more fancy, you can have an arrayList of PVector. It is almost the same as the solution above but instead of having 2 array you only have one.

And if you want to go the extra mile, you can also create your own Ellipse class to hold their coordinate and take care of other logic like drawing them on screen for exemple. Here again using an arrayList of Ellipse object could be the solution.