I am trying to generate random array of integers using new Stream API in Java 8. But I haven\'t understood this API clearly yet. So I need help. Here is my code.
There's no reason to boxed(). Just receive the Stream as an int[].
boxed()
Stream
int[]
int[] array = intStream.limit(limit).toArray();