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 Po
You can also use Apache Commons Bean Comparator
http://commons.apache.org/beanutils/apidocs/org/apache/commons/beanutils/BeanComparator.html
And then do something like
import org.apache.commons.beanutils.BeanComparator; Arrays.sort(A, new BeanComparator("x"));