Hi,
So I wanna sort an array of Points using the built in sorting method, by a specific coordinate, say x. How can I do this? Heres a sample code:
Point A[] = new Point[10];
// ... Initialize etc.
Arrays.sort(A, x-coordinate);
Is there a built-in comparator for x-coordinates in Point Class? If not, how can I create one and use it. An example would be great.
Thanks.