Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java

Stream and Data Structure. Plz help

Will operation of a stream change its original object's data structures? What is the data structure when
List <String> m. stream(). filter( m-> isMPass(m)) <- what is the data structure of this output?

2 Answers

Will operation of a stream change its original object's data structures?

No

What is the data structure when List <String>?

it outputs strings, if you need to change the output to another data type use map,

i didn't use the features of java 8 a lot but I think you should add .collect(Collectors.toList()); at the end so you can return a list