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 method would you use to collect elements into a list from a stream?
Think about the method that gathers all elements.
What is the purpose of the .filter() method in a stream?
What do you need to do to exclude data?
What method do you use to filter elements in a stream?
Recall how to narrow down a stream.
True or False: Collectors can only be used to gather data into lists.
What types of collections can you think of?
You have a list of names. Write a method that uses streams to filter out names starting with vowels and then group them by their length.
Identify the starting character and think about length classification.
Create a Stream that collects all unique ages from a list of people, filtering out duplicates and returning them in a sorted order.
Focus on distinct() to remove duplicates and sorted() for ordering.
5 more questions in this section. Enroll free to practise them all.
Enroll free