Skip to content

Instantly share code, notes, and snippets.

@evanchooly
Created July 7, 2016 13:54
Show Gist options
  • Save evanchooly/7e63d7c2b3798874c3275adea2936aef to your computer and use it in GitHub Desktop.
Save evanchooly/7e63d7c2b3798874c3275adea2936aef to your computer and use it in GitHub Desktop.
"how do I cast[sic] ArrayList<Integer> to int[] ? I've found toArray can only convert into Integer[]"
list.stream().mapToInt(i -> i.intValue()).toArray()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment