I have an ArrayList
object which its values are arrays of Object
. I want to convert it to an array. This is the summary of what i did:
ArrayList result = new ArrayList();
Object[] row = new Object[4];
result.add(row);
Object[][] arrayResult = result.toArray();
but I get an error that i can't cast it to an Object[][]
. What should I do?