📄 cylindertest.java
字号:
import p2.Point;
public class CylinderTest
{
public static void main(String agrs[])
{
Cylinder cy1=new Cylinder(2,3,4,5);
Point p=new Point(3,4);
Cylinder cy2=new Cylinder(p,5,6);
Cylinder cy3=new Cylinder();
System.out.println("The volume of the cy1(2,3,4,5) is: "+cy1.volume());
System.out.println("The volume of the cy1(p(3,4),5,6) is: "+cy2.volume());
System.out.println("The volume of the cy3() is: "+cy3.volume());
System.out.println("The surfaceArea of the cy1(2,3,4,5)is : "+cy1.surfaceArea());
System.out.println("The surfaceArea of the cy2(p(3,4),5,6)is :"+cy2.surfaceArea());
System.out.println("The surfaceArea of the cy3()is :"+cy3.surfaceArea());
System.out.println(cy1.toString());
System.out.println(cy1.equals(cy2));
System.out.println(cy1.equals(cy1));
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -