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
Google Guava provides a neat way to do this by calling Ints.toArray.
List list = ...; int[] values = Ints.toArray(list);