class Point extends Object {
protected int x;
void setx(int x) { this.x = x;}
int getx() { return x;}
}
class ColorPoint extends Point {
protected String c;
void setx(String c) { this.c = c.clone();}
String getcol() { return c;}
}
Point p;
ColorPoint q;
p.setx(3);
q.setx(4);
q.setcol("blue");
System.out.println("Point at "
+p.getx().toString()
+" "+q.getcol()
+" Colorpoint at "
+q.getx().toString()
+"\n");;