title: Difference between map and filter on a java collection stream
body: <p>Suppose there is a list say</p>
  
  <pre><code>List&lt;String&gt; myList = new ArrayList&lt;String&gt;();
  myList.add("okay");
  myList.add("omg");
  myList.add("kk");
  </code></pre>
  
  <p>I am doing this:</p>
  
  <pre><code>List&lt;String&gt; fianllist = myStream.map(item -&gt; item.toUpperCase()).filter(item
  -&gt;item.startsWith("O")).collect(Collectors.toList());
  </code></pre>
  
  <p>My question is what the difference between map and filter as both can take a lambda expression as a parameter. Can some one please explain? </p>