我不明白为什么在编译代码时会出现这些错误。
错误:F:\G\programA: 运算符 * 不能应用于 int,double[]
错误:F:\G\programA: 运算符 - 不能应用于双精度、双精度 []
import java.io.*;
public class programA
{
public static void main (String [] args) throws IOException
{
BufferedReader myInput = new BufferedReader (new InputStreamReader (System.in));
int points = 100, dimension = 3;
double [] length;
length = new double [dimension];
double [][] loc;
loc = new double [points][dimension];
for (int x = 0; x < points; x++){
for (int y = 0; y < dimension; y++){
location [x][y]= (Math.random() * (2 *length)) - length;
}
}
}
}