title: How to generate random array of ints using Stream API Java 8?
body: <p>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. </p>
  
  <pre><code>Random random = new Random();
  IntStream intStream = random.ints(low, high);
  int[] array =  intStream.limit(limit) // Limit amount of elements
                                      .boxed() // cast to Integer
                                      .toArray();
  </code></pre>
  
  <p>But this code returns array of objects. What is wrong with it?</p>