使用此关键字调用另一个构造函数
class Circle { /** 来 自 nowjava **/ int x, y, radius; Circle (int xPoint, int yPoint, int radiusLength) { this.x = xPoint; this.y = yPoint; this.radius = radiusLength; } Circle (int xPoint, int yPoint) { this(xPoint, yPoint, 1); } }
class Circle { /** 来 自 nowjava **/ int x, y, radius; Circle (int xPoint, int yPoint, int radiusLength) { this.x = xPoint; this.y = yPoint; this.radius = radiusLength; } Circle (int xPoint, int yPoint) { this(xPoint, yPoint, 1); } }