Explore Connect Documentation
Snippets
1
39
40
41
42
43
44
45
46
47
48
49
// {
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);
  }
}
Enter to Rename, Shift+Enter to Preview