Basically what I want to do is this:
Point[] points = new Point[]{new Point(2, 3), new Point(7,8), new Point(1, 8)};
int[] xCoords = new int[points.length];
for (int i = 0; i < points.lenght; i++) {
xCoords[i] = points[i].x;
}
So that in the end I would end up with xCoords looking like this:
{2, 7, 8}
Is it possible to archive this in a more general fashion?