1 Arrays.sort(points, new comparator()); 2 3 public static class comparator implements Comparator<Point> { 4 public int compare(Point p1, Point p2) { 5 return p1.x - p2.x; 6 }
posted on 2014-05-02 23:39 longhorn 阅读(159) 评论(0) 编辑 收藏 举报