public class PointMain2 { public static void main(String[] args) { // create two Point objects Point p1 = new Point(2, 3); System.out.println(p1.x + ", " + p1.y); // 2, 3 Point p2 = new Point(4, 6); System.out.println(p2.x + ", " + p2.y); // 4, 6 // create a third Point with using a constructor with // no parameters (constructs a Point at the origin) Point p3 = new Point(); System.out.println(p3.x + ", " + p3.y); // 0, 0 } }