class Point implements Cloneable {
  int x, y;
  Point(int xx, int yy) { x = xx; y = yy; }
  protected Object clone () throws CloneNotSupportedException { 
    return super.clone(); 
    }
}

class ClonePoint {
  public static void main(String[] args) throws CloneNotSupportedException {
    Point a = new Point(2, 3);
    Point b = (Point) a.clone();
    System.out.println(a);
    System.out.println(b);
    b.x = a.x + 1;
    System.out.println(a.x + " " + b.x);
  }

}

