title: Split a stream if it contains multiple comma-separated values
body: <p>This code will add all elements from mylist to mylist2.</p>
  
  <p>How can I change it to add elements if it finds a comma, and separates them?</p>
  
  <pre><code>ArrayList&lt;String&gt; mylist = new ArrayList&lt;String&gt;();
  mylist.add("test");
  mylist.add("test2, test3");
  ArrayList&lt;String&gt; mylist2 = new ArrayList&lt;String&gt;();
  
  mylist.stream()
      .forEach(s -&gt; mylist2.add(s));
  
  mylist2.stream().forEach(System.out::println);
  </code></pre>
  
  <p>So, current output is:</p>
  
  <pre><code>test
  test2, test3
  </code></pre>
  
  <p>and I need the second arraylist to contain and then print:</p>
  
  <pre><code>test
  test2
  test3
  </code></pre>
  
  <p>I know in Java 8 there are filters. Could I do something like</p>
  
  <p><code>.filter(p -&gt; p.contains(",")...</code>
  then something to split it?</p>