title: Java 8, collect method, creating a new arraylist and mutation
body: <p>I just want to clarify something regarding the code below:</p>
  
  <pre><code>public static void ageOverTen(final List&lt;Human&gt; man) {
      final List&lt;Human&gt; byAge = man.stream()
              .filter(age -&gt; age.getAge() &gt; 10)
              .collect(ArrayList::new, ArrayList::add, ArrayList::addAll);
  
      System.out.println("People over 10 years: " + byAge);
  }
  </code></pre>
  
  <p>In the Java world we all know <code>ArrayList</code> is not thread safe and it's mutable, so when you create a stream and use a <code>collect()</code> method, and in it we create an <code>ArrayList</code>. How does the library affect <code>ArrayList</code> thread safety and mutation, to make it comply with functional programming concept of immutability?</p>