CodePudding user response:
Public class Circle {Private double r;
Public Circle (double r) {this. R=r; }
Public double area () {return 3.1415926 * r * r; }
Public static void main (String [] args) {
Circle c=new Circle (3);
System. The out. Println (c.a. rea ());
}
}