我正在尝试使用数据库中的一些值创建一个 3 维数组,但是我收到了一个并没有告诉我太多的错误。知道它可能是什么吗?
db_pstackNr
是由数字 (2,3) 组成的字符串
db_stackValue
是由 48 个元素(A、B、C、D、空)组成的字符串
org.apache.jasper.JasperException:在第 51 行处理 JSP 页面 /license/console.jsp 时发生异常(multi[i][j][n] = stackValue[k];)
int stackNr = 2;
String [] ar_pstackNr = db_pstackNr.split(",");
String [] stackValue = db_stackValue.split(",");
String [][][] multi = new String [stackNr][][];
int [] pstackNr = new int[ar_pstackNr.length];
int palet = 16, m=0, n=0;
for(int i = 0; i < stackNr; i++) {
pstackNr[i] = Integer.parseInt(ar_pstackNr[i]);
for(int j = 0; j < pstackNr[i]; j++) {
if (i > 0) {
palet += 16; m +=16;
}
for(int k = m; k < palet; k++) {
multi[i][j][n] = stackValue[k];
n++;
out.println(multi[i][j][n]);
}
}
}