[求助]一个能通过编译 运行却没反应的JAVA程序
public class ArrayCal
{
public static void main(String[] args)
{
int[] array1=new int[30];
int m=2;
for (int i=0;i<array1.length;m=m+2)
{
array1[i]=m;
}
int[] array2=new int[6];
int z=0;
for (int n=0;n<array1.length;n=n+5)
{
array2[z]=array1[n]+array1[n+1]+array1[n+2]+array1[n+3]+array1[n+4];
z++;
}
System.out.println("1--5个数之和为:"+array2[0]+"\n");
System.out.println("6--10个数之和为:"+array2[1]+"\n");
System.out.println("11--15个数之和为:"+array2[2]+"\n");
System.out.println("16--20个数之和为:"+array2[3]+"\n");
System.out.println("21--25个数之和为:"+array2[4]+"\n");
System.out.println("26--30个数之和为:"+array2[5]+"\n");
}
}