Question: Java classes Point reference semantics What are the x - and y - coordinates of the Points referred to as p 1 , p 2

Java classes Point reference semantics
What are the x- and y-coordinates of the Points referred to as p1, p2, and p3 after the following code executes? Give your answer as an x-y pair such as (0,0).
Point p1= new Point(17,9);
Point p2= new Point(4,-1);
Point p3= p2;
p1.translate(3,1);
p2.x =50;
p3.translate(-4,5);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!