Iterate two lists simultaneously and create another using streams : <p>I want to achieve following using streams:</p>

<pre><code>List&lt;MyObject&gt; list1 = Arrays.asList(obj1, obj2, obj3);
List&lt;Boolean&gt; list2 = Arrays.asList(true, false, true);
List&lt;MyObject&gt; list = new ArrayList&lt;&gt;();
for(int i=0; i&lt;list1.size();i++) {
     if(list2.get(i))
         list.add(list1.get(i));
}
</code></pre>

<p>Can anyone help? It should be easy but I am new to java streams.</p>

<p><strong>Note:</strong> The length of list1 and list2 would be same always.</p>
