Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions