I have a function taking an int array and need to have that array put into an arraylist
So I use list.addAll(Arrays.asList(array));
However since list
is ArrayList<Integer>
, the addAll
only accepts Integer[]
instead of int[]
How should I box the primitive array into an Integer Object array?