Search the courses, subjects, tracks, games and features, or jump straight to a page.
2 cards from this section. Quick, good the night before a test.
What is the purpose of the Stream API in Java?
Think about how it allows operations to be performed on collections.
What is a lambda expression?
Recall the syntax: (parameters) -> expression.
What operation would you use to remove elements that do not meet a condition in a Stream?
Consider which operation narrows down the elements.
True or False: Lambda expressions can express behaviors that are passed into methods.
Think about the flexibility they provide in method parameters.
Write a method that returns a List of squared values from an input List of integers using the Stream API.
Think about what map will do with the elements.
Using the Stream API, how would you count the total number of words in a list of sentences?
Consider how to break down the sentences into their components.
5 more questions in this section. Enroll free to practise them all.
Enroll free