1个回答
展开全部
public class Test {
public static double area(double length,double width){
return length * width;
}
public static double bulk(double length,double width,double height){
return length * width * height;
}
public static void main(String[] args) {
System.out.println("面积:"+Test.area(12.5, 2));
System.out.println("体积:"+Test.bulk(12.5, 2, 2.5));
}
}
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询