class point {
int x;
int y;
point()
{
x=0;
y=0;
}
point(int _x,int _y)
{
x = _x;
y = _y;
}
int getPointX()
{
return x;
}
int getPointY()
{
return y;
}
int setPointX(int a)
{
return x = a;
}
int setPointY(int b)
{
return y = b;
}
public static void main(String[] args)
{
circle p1 = new circle((1,111),1222);
System.out.println(p1.r);
}
};
class circle
{
point o;
int r;
circle(point _o,int _r)
{
o = _o;
r = _r;
}
};来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/1414/viewspace-3135519/ ,如需转载,请注明出处,否则将追究法律责任。