class Point
{ private int x,y;
public Point(int x,int y)
{
this.x=x; //this它代表当前对象名
this.y=y;
}
public void Draw()
{
}
public Point()
{
this(0,0); //this(参数)调用本类中另一种形成的构造函数
}
}
class Circle extends Point
{
private int radius;
public circle(int x0,int y0, int r )
{
super(x0,y0); //super(参数)调用基类中的某一个构造函数
radius=r;
}
public void Draw()
{
super.Draw(); //super它引用当前对象的直接父类中的成员
drawCircle();
}}
{ private int x,y;
public Point(int x,int y)
{
this.x=x; //this它代表当前对象名
this.y=y;
}
public void Draw()
{
}
public Point()
{
this(0,0); //this(参数)调用本类中另一种形成的构造函数
}
}
class Circle extends Point
{
private int radius;
public circle(int x0,int y0, int r )
{
super(x0,y0); //super(参数)调用基类中的某一个构造函数
radius=r;
}
public void Draw()
{
super.Draw(); //super它引用当前对象的直接父类中的成员
drawCircle();
}}