File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change 4
4
public class Exercise {
5
5
6
6
public static void main (String [] args ) {
7
- ArrayList <Coordinate > coordinates = new ArrayList <>();
7
+ ArrayList <Coordinate > coordinates = new ArrayList <>();
8
8
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 ));
14
14
15
- Collections .sort (coordinates );
15
+ Collections .sort (coordinates );
16
16
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
+ }
20
20
}
21
21
}
You can’t perform that action at this time.
0 commit comments