// A class that makes use of the Point class public class UsePoint { public static void main(String[] args) { Point p1 = new Point(5, 6); System.out.println("p1: " + p1); Point p2 = new Point(10, 11); System.out.println( "p2: " + p2); // let's test them for equality if (p1 == p2) { System.out.println("p1 == p2"); } else { System.out.println("p1 != p2"); } System.out.println(); // make p1 and p2 have same location p2.setLocation(5, 6); System.out.println("p1: " + p1); System.out.println("p2: " + p2); // let's test them for equality if (p1 == p2) { System.out.println("p1 == p2"); } else { System.out.println("p1 != p2"); } } }