Search the courses, subjects, tracks, games and features, or jump straight to a page.
3 cards from this section. Quick, good the night before a test.
What method do you use to group elements in a collection?
Think about the class that helps collect stream results.
Which method separates a collection into two categories based on a condition?
This method uses a two-way split.
What is the purpose of Collectors.groupingBy()?
Think about how you would organize your files.
True or False: Partitioning creates a single collection with duplicate elements.
Consider what happens to elements when separated.
Write a program that reads a list of integers and partitions them into even and odd numbers. Then group the odd numbers by their length when expressed as strings.
Use lambda expressions for conditions.
Imagine you are analyzing survey results where respondents can select multiple answers. Write code to group the respondents by their selected categories and then partition those who selected more than one category from those who selected only one.
Consider how you might store a respondent's answers.
6 more questions in this section. Enroll free to practise them all.
Enroll free