public class Sale {
public static void main(String[] args) {
int[] group1={100,200,300,400};
int[] group2={100,200,300,400};
int[] group3={100,200,300,400};
int[] group4={100,200,300,400};
int[][] group={group1,group2,group3,group4};
int[] sale = new int[4];
for(int month=0;monthfor(int groupNo=0;groupNo sale[month]+=group[groupNo][month];
}
}
System.out.println(Arrays.toString(sale));
}
}
外循环是月,内循环是组