How can I convert List<Integer> to int[] in Java?
How can I convert a List<Integer> to int[] in Java? I'm confused because List.toArray() actually returns an Object[], which can be cast to neither Integer[] nor int[]. Right now I'm using a l...