关于抽象类课后思考
public class Circle extends Shape {
float r=5.0f;
@Override
public float zhouchang() {
float zhouchang=3*2*r;
return zhouchang;
}
@Override
public float mianji() {
// TODO Auto-generated method stub
float mianji=3*r*r;
return mianji;
}
public void print(){
System.out.println("圆的周长为");
}
}
怎么样才能输出周长,