java - How do i convert an ArrayList into a multidimensional Array? -


this line of code throwing me exception: exception in thread "main" java.lang.indexoutofboundsexception: index: 5, size: 5

string [][] employeenamesa = new string [2][index]; (int = 0; i<index; i++)employeenamesa[0][i] = employeenames.get(i); 

i trying convert arraylist multidimensional array.

your employeenames list doesn't have index amount of elements. has 5, means throw indexoutofboundsexception when executing employeenames.get(i) = 5.


Comments

Popular posts from this blog

ruby - Nesting modules inside of a Rails eninge gem -

Eclipse formatter for java ending braces -

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -