I\'m trying to convert an ArrayList containing Integer objects to primitive int[] with the following piece of code, but it is throwing compile time error. Is it possible to
Integer[] arr = (Integer[]) x.toArray(new Integer[x.size()]);
access arr like normal int[].
arr
int[]