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
A very simple one-line solution is:
Integer[] i = arrlist.stream().toArray(Integer[]::new);