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.
You can do it using ThreadLocalRandom.
ThreadLocalRandom
int[] randInts = ThreadLocalRandom.current().ints().limit(100).toArray();