title: How to manipulate the string using stream API in Java. which api method is suitable
body: <p>How to manipulate the string using stream API in Java. which api method is suitable.</p>
  <p>I am trying some Java 8 features.</p>
  <p>so lets say I have list of string</p>
  <pre><code>List&lt;String&gt; str = Arrays.asList(&quot;Hello World&quot;,&quot;Welcome America&quot;);
          List&lt;String&gt; res = str.stream()
                            .map(st -&gt; st.split(&quot; &quot;))
                            .collect(Collectors.)); // here after Collectors what should I use. 
                            
                        
                        
  </code></pre>
  <p>my output should be like : [Hello Welcome, Wrold America]</p>
  <p>hwrw by using <code>map</code> i am transforming the list but I am not getting any method to collect that. any help so i can do it by using stream.</p>