convert arraylist to array int

Solutions on MaxInterview for convert arraylist to array int by the best coders in the world

showing results for - "convert arraylist to array int"
Marion
18 Jan 2020
1//only works in java 8 or later
2list.stream().mapToInt(i -> i).toArray();
Emma
27 Mar 2019
1int[] arr = {1,2,3};
2IntStream.of(arr).boxed().collect(Collectors.toList());
Arda
26 Mar 2020
1templist.stream().mapToInt(i->i).toArray();
similar questions
queries leading to this page
convert arraylist to array int