public class Circle {
double x;
double y;
double r;
Circle(){
x = 1.0;
y = 1.0;
r = 2.0;
System.out.println("c1的圆心:"+"("+x+","+y+")"+"c1的半径:"+r);
}
Circle(double xx, double yy,double rr){
x = xx;
y = yy;
r = rr;
System.out.println("c2的圆心:"+"("+x+","+y+")"+"c1的半径:"+r);
}
void setCircle(double xx, double yy,double rr){
x = xx;
y = yy;
r = rr;
}
void Circle1(Circle i) {
if(x==i.x&&y==i.y&&r==i.r)
System.out.println("c1和c2重叠");
else
System.out.println("c1和c2不重叠");
}
double x;
double y;
double r;
Circle(){
x = 1.0;
y = 1.0;
r = 2.0;
System.out.println("c1的圆心:"+"("+x+","+y+")"+"c1的半径:"+r);
}
Circle(double xx, double yy,double rr){
x = xx;
y = yy;
r = rr;
System.out.println("c2的圆心:"+"("+x+","+y+")"+"c1的半径:"+r);
}
void setCircle(double xx, double yy,double rr){
x = xx;
y = yy;
r = rr;
}
void Circle1(Circle i) {
if(x==i.x&&y==i.y&&r==i.r)
System.out.println("c1和c2重叠");
else
System.out.println("c1和c2不重叠");
}
}
import java.util.*;
public class TestCircle {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner scanner=new Scanner(System.in);
int xx=scanner.nextInt();
int yy=scanner.nextInt();
int rr=scanner.nextInt();
Circle c1=new Circle();
Circle c2=new Circle(xx,yy,rr);
c2.Circle1(c1);
}
}
![](https://i-blog.csdnimg.cn/blog_migrate/077f2ced9174798488753a36cd804fb8.png)