I have a class Person having a set of Objects Contacts. I want to get a stream of Contacts from the stream of Persons.
public class Persons{
     private Set<Contact> contacts;
}
persons.stream().map(Person::getContacts);
gives me Stream<Set<Contact>> rather a Stream<Contact>
Any suggestion or help would be appreciated as I am quite new to Java 8 and Streams.
 
     
     
     
    