convert arraylist of integers to array primitive

Solutions on MaxInterview for convert arraylist of integers to array primitive by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "convert arraylist of integers to array primitive"
Francisco
11 Sep 2017
1//only works in java 8 or later
2list.stream().mapToInt(i -> i).toArray();
Mila
21 Jan 2018
1list.stream().mapToInt(i -> i).toArray();
similar questions