What will be the output of the following code?
import java.awt.Point;
class Testing
{
public static void main(String[] args)
{
Point t1,t2,t3;
t1=new Point(100,100);
t2=t1;
t3=t1;
t1.x=200;
t1.y=200;
t2.x=300;
t3.y=500;
System.out.println(“Point 1: ” + p1.x + ”, “ + p1.y);
}
}
- Point 1: 200, 200
- Point 1: 100,100
- Point 1: 300, 300
- Point 1: 300, 500
(d).Point 1: 300, 500
need an explanation for this answer? contact us directly to get an explanation for this answer