Skip to main content
Added a lead, etc.
Source Link
Peter Mortensen
  • 31.4k
  • 22
  • 110
  • 134

Use:

Stream<Integer> stream = Stream.of(1, 2, 3, 4, 5, 6); int[] arr= arr = stream.mapToInt(x->x.intValue()).toArray(); 
Stream<Integer> stream = Stream.of(1, 2, 3, 4, 5, 6); int[] arr=  stream.mapToInt(x->x.intValue()).toArray(); 

Use:

Stream<Integer> stream = Stream.of(1, 2, 3, 4, 5, 6); int[] arr = stream.mapToInt(x->x.intValue()).toArray(); 
Source Link
Raj N
  • 259
  • 2
  • 19

Stream<Integer> stream = Stream.of(1, 2, 3, 4, 5, 6); int[] arr= stream.mapToInt(x->x.intValue()).toArray();