例题 设计一个求圆面积的类
作者:互联网
package com.atguigu.java;
public class TestCircle {
public static void main(String[] args) {
Circle a = new Circle();
a.r = 2.00;
System.out.println(a.s());
}
}
class Circle{
double r;
public double s() {
return rr3.14;
}
}
标签:double,class,设计,Circle,例题,圆面积,public 来源: https://blog.csdn.net/weixin_38914772/article/details/100160035