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

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -