Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Collections.sort(points, new Comparator<Point>() {
- public int compare(Point a, Point b) {
- if(a.getX() > b.getX()) {
- return 1;
- }else if(a.getX() < b.getX()) {
- return -1;
- }else {
- return 0;
- }
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement