Typecast a ArrayList.toArray() in Java to normal array
- by Marthin
I'm having some trouble to do the following:
int[] tmpIntList = (int[])MyArrayList.toArray(someValue);
MyArrayList contains only numbers. I get a typecast error since ArrayList only returns Object[] but why isnt it possible to turn it into a int[] ?