Search the courses, subjects, tracks, games and features, or jump straight to a page.
4 cards from this section. Quick, good the night before a test.
What does the filter() method do in a Stream?
Think about what you're trying to achieve with the elements in the Stream.
What type of operation is map()?
Recall if it returns a Stream or a final result.
What type of operation is the map() method?
Recall how the method affects the data flow.
The collect() method is used for what purpose?
Think about the final form you want the data to take.
Build a Stream operation that filters a list of integers to find the sum of all even numbers.
Consider the condition that defines even numbers.
Create a program that counts the number of unique words from a Stream of sentences.
Use distinct() to handle unique entries and consider using flatMap for breaking sentences into words.
6 more questions in this section. Enroll free to practise them all.
Enroll free