title: Java 8 Filter Array Using Lambda
body: <p>I have a <code>double[]</code> and I want to filter out (create a new array without) negative values in one line without adding <code>for</code> loops. Is this possible using Java 8 lambda expressions?</p>
  
  <p>In python it would be this using generators:</p>
  
  <pre><code>[i for i in x if i &gt; 0]
  </code></pre>
  
  <p>Is it possible to do something similarly concise in Java 8?</p>