File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44public class Exercise {
55
66 public static void main (String [] args ) {
7- ArrayList <Coordinate > coordinates = new ArrayList <>();
7+ ArrayList <Coordinate > coordinates = new ArrayList <>();
88
9- coordinates .add (new Coordinate (3 , 5 ));
10- coordinates .add (new Coordinate (7 , 6 ));
11- coordinates .add (new Coordinate (2 , 1 ));
12- coordinates .add (new Coordinate (6 , 8 ));
13- coordinates .add (new Coordinate (1 , 9 ));
9+ coordinates .add (new Coordinate (3 , 5 ));
10+ coordinates .add (new Coordinate (7 , 6 ));
11+ coordinates .add (new Coordinate (2 , 1 ));
12+ coordinates .add (new Coordinate (6 , 8 ));
13+ coordinates .add (new Coordinate (1 , 9 ));
1414
15- Collections .sort (coordinates );
15+ Collections .sort (coordinates );
1616
17- for (Coordinate c : coordinates ) {
18- System .out .println (c + ": " + c .getDistanceToOriginPoint ());
19- }
17+ for (Coordinate c : coordinates ) {
18+ System .out .println (c + ": " + c .getDistanceToOriginPoint ());
19+ }
2020 }
2121}
You can’t perform that action at this time.
0 commit comments