Skip to content

Commit a0150f4

Browse files
committed
reviewed ch10
1 parent 353ee38 commit a0150f4

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎ch10/PointRect.java‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ public static void main(String[] args) {
1515
System.out.println(blank.x + ", " + blank.y);
1616
int sum = blank.x * blank.x + blank.y * blank.y;
1717

18+
Point p1 = new Point(0, 0);
19+
Point p2 = new Point(3, 4);
20+
double dist = p1.distance(p2); // dist is 5.0
21+
1822
Rectangle box = new Rectangle(0, 0, 100, 200);
1923
moveRect(box, 50, 100);
2024
System.out.println(box);

0 commit comments

Comments
 (0)