22.11 - Stream API and Lambda Expressions
Enroll to start learning
You’ve not yet enrolled in this course. Please enroll for free to listen to audio lessons, classroom podcasts and take practice test.
Practice Questions
Test your understanding with targeted questions
What is the purpose of the Stream API in Java?
💡 Hint: Think about how it allows operations to be performed on collections.
What is a lambda expression?
💡 Hint: Recall the syntax: (parameters) -> expression.
4 more questions available
Interactive Quizzes
Quick quizzes to reinforce your learning
What operation would you use to remove elements that do not meet a condition in a Stream?
💡 Hint: Consider which operation narrows down the elements.
True or False: Lambda expressions can express behaviors that are passed into methods.
💡 Hint: Think about the flexibility they provide in method parameters.
1 more question available
Challenge Problems
Push your limits with advanced challenges
Write a method that returns a List of squared values from an input List of integers using the Stream API.
💡 Hint: 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?
💡 Hint: Consider how to break down the sentences into their components.
Get performance evaluation
Reference links
Supplementary resources to enhance your learning experience.