?? createspheres.java
字號:
public class CreateSpheres
{
public static void main(String[] args)
{
System.out.println("Number of objects = " + Sphere.getCount());
Sphere ball = new Sphere(4.0, 0.0, 0.0, 0.0); // Create a sphere
System.out.println("Number of objects = " + ball.getCount());
Sphere globe = new Sphere(12., 1.0, 1.0, 1.0); // Create a sphere
System.out.println("Number of objects = " + Sphere.getCount());
Sphere eightBall = new Sphere(10.0, 10.0, 0.0);
Sphere oddBall = new Sphere();
System.out.println("Number of objects = " + Sphere.getCount());
// Output the volume of each sphere
System.out.println("ball volume = " + ball.volume());
System.out.println("globe volume = " + globe.volume());
System.out.println("eightBall volume = " + eightBall.volume());
System.out.println("oddBall volume = " + oddBall.volume());
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -