我有这个简单的代码:
double[][] params = new double[][]{{197.0,258.0,427.0,426.0,507.0,524.0,386.0},
{345.0,473.0,484.0,422.0,406.0,291.0,289.0}};
for (int i = 0; i <= params.length; i++) {
for (int j = 0; j <= params[i].length; j++) {
System.out.println("Coordinates: " + params[i][j]); //line 29
}
}
和错误:
> Caused by: java.lang.ArrayIndexOutOfBoundsException: 7 at
> com.eyecom.gen.generate_xml(gen.java:29)
为什么我会得到这个异常?