title: How to use stream in Java 8 to collect a couple of fields into one list?
body: <p>For example I have class <code>Person</code> with <em>name</em> and <em>surname</em> fields. </p>
  
  <p>I want to collect a <code>List</code> of <code>String</code> (names and surnames all together) from <code>List</code> of <code>Person</code>, but it seems that I can't use map twice per one list or can't use stream twice per list.</p>
  
  <p>My code is:</p>
  
  <pre><code>persons.stream()
     .map(Person::getName)
     .collect(Collectors.toSet())
     .stream().map(Person::getSurname) 
     .collect(Collectors.toList())
  </code></pre>
  
  <p>but it keeps telling me that <code>Person::getSurname</code> non-static method can't be referenced from static context.</p>
  
  <p>What am I doing wrong?</p>