title: Arrays.stream(array) vs Arrays.asList(array).stream()
body: <p>In <a href="https://stackoverflow.com/questions/27391028/arrays-aslist-vs-arrays-stream-to-use-foreach">this</a> question it has already been answered that both expressions are equal, but in this case they produce different results. For a given <code>int[] scores</code>, why does this work:</p>
  
  <pre><code>Arrays.stream(scores)
          .forEach(System.out::println);
  </code></pre>
  
  <p>...but this does not:</p>
  
  <pre><code>Arrays.asList(scores).stream()
          .forEach(System.out::println);
  </code></pre>
  
  <p>As far as I know <code>.stream()</code> can be called on any Collection, which Lists definitely are. The second code snippet just returns a stream containing the array as a whole instead of the elements.</p>