/* Jeremy Lipschutz This class practices reference semantics and the x = change(x) pattern */ public class PointClient { public static void main(String[] args) { Point p = new Point(1, 2); change1(p); System.out.println(p); p = change2(p); // x = change(x) System.out.println(p); } public static void change1(Point p) { p.x = 14; } public static Point change2(Point p) { p = new Point(7, 8); return p; } }