错在哪里啊求解
public class TestShuzhu { public static void main(String[] args) { int[] nums= new int[]{61,23,4,74,13,148,20}; int max = nums[0]; int min = nums[0]; double sum = 0; double avg = 0; for (int i =0;i<nums.length;i++){ if(nums[i]>max){ nums[i]=max; }else if (nums[i]<min){ nums[i]=min; } sum+=nums[i];} avg/=sum/nums.length; System.out.println("数组的最大值是"+max); System.out.println("书阻塞最小值是"+min); System.out.println("平均值是"+avg); } } 打印为什是 数组的最大值是61 书阻塞最小值是61 平均值是0.0 求解