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
Post a Comment