标签:keyword string plain neu space ber ring nbsp val
import
java.lang.Math;
public
class
C{
private
double
radius;
C(
double
r){
this
.radius = r;
}
public
double
areaCal(){
return
Math.PI*this.radius*this.radius
;
}
public
double
perimeterCal(){
return
2
*Math.PI*
this
.radius;
}
public
static
void
main(String[] args){
c =
new C
(
);
System.out.println(
"周长为:"
+c.perimeterCal());
System.out.println(
"面积为: "
+c.areaCal());
}
}
标签:keyword string plain neu space ber ring nbsp val
原文地址:http://www.cnblogs.com/woof95610/p/7504399.html