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

class Clone2Point {
  public static void main(String[] args) {
    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);
  }

}

