cylinder.java~5~
来自「java 的几个比较不错的有代表性的案例的源码」· JAVA~5~ 代码 · 共 27 行
JAVA~5~
27 行
/** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2004</p> * <p>Company: </p> * @author not attributable * @version 1.0 */public class Cylinder extends Circle { protected double height; public Cylinder(double h,double r,double a,double b) { super(r,a,b); setHeight(h); } public void setHeight( double h ){ height = (h>=0?h:0); } public double getHeight(){ return height; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?