java - 3d array An exception occurred processing JSP page -
i'm trying create 3 dimensional array values database, i'm getting error doesn't tell me much. idea can be?
db_pstacknr
string formed numbers (2,3)
db_stackvalue
string formed 48 elements (a,b,c,d,empty)
org.apache.jasper.jasperexception: exception occurred processing jsp page /license/console.jsp @ line 51 (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 = 0; < 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]); } } }
you dont have 2nd dimension of multi initialized, trying access j index.
Comments
Post a Comment