// {...}
public class PointExample2 {
public static void main(final String[] args) {
Point p1 = new Point(1, 2);
Point p2 = p1;
p2.reflect(); // p1 is also modified
System.out.println(p1);
}
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX