Question: [ IN JAVA ] 2. What is the output of the program? 3. At the end of main, are p1 and p2 aliased? Why or

[ IN JAVA ]

2. What is the output of the program? 3. At the end of main, are p1 and p2 aliased? Why or why not?

public static void main(String[] args) { 
Rectangle box1 = new Rectangle(2, 4, 7, 9); Point p1 = findCenter(box1); printPoint(p1); 
box1.grow(1, 1); Point p2 = findCenter(box1); 
printPoint(p2); } 

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!