![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java
厭_世
这个作者很懒,什么都没留下…
展开
-
继承父类求解矩形,圆形的面积和周长
抽象类 package Demo2; public abstract class Shape { double area; double per; String color; public Shape(){ super(); } public Shape(String color){ super(); this.color=color; } public abstract double getArea(); public abstract double getper();原创 2022-05-08 10:40:19 · 647 阅读 · 0 评论 -
1.分别定义方法,求一个整数数组的最大值、最小值、平均值和所有数组元素的和(4个方法)
1.分别定义方法,求一个整数数组的最大值、最小值、平均值和所有数组元素的和(4个方法) package Demo6; public class fjsl { public static void main(String[] args) { int arr[]=new int[]{12,3,45,64}; System.out.println("最大值为"+MAX(arr)); System.out.println("最小值为"+MIN(arr)); System.out.println(原创 2022-05-08 10:32:44 · 1796 阅读 · 0 评论