📄 roundstuff.java
字号:
/**
Class with static methods for circles and spheres.
*/
public class RoundStuff
{
public static final double PI = 3.14159;
/**
Return the area of a circle of the given radius.
*/
public static double area(double radius)
{
return (PI*radius*radius);
}
/**
Return the volume of a sphere of the given radius.
*/
public static double volume(double radius)
{
return ((4.0/3.0)*PI*radius*radius*radius);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -