public double[] deel(int[] rij1, int[] rij2)
{
final int RIJ_LENGTH = 5;
double rij[] = new double [RIJ_LENGTH];
for (int i = 0; i < rij.length; i++)
rij[i] = (double) (rij1[i]/rij2[i]);
return rij;
}
这是一种创建名为“rij”的新数组的方法。这个新数组具有元素 (rij1 / rij2)。所以 rij[0] = rij1[0]/rij2[0]
但是当我尝试运行此代码时,它显示错误:“/ by zero”
请帮我。