1.5 - Built-in Functional Interfaces in java.util.function
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 a Predicate in Java?
💡 Hint: Think about functions that return true or false.
Provide an example of a Consumer.
💡 Hint: What does a Consumer do with its input?
4 more questions available
Interactive Quizzes
Quick quizzes to reinforce your learning
What does a Predicate do?
💡 Hint: What type of values does a Predicate give?
True or False: A Supplier takes an input parameter.
💡 Hint: Consider the definition of a Supplier.
2 more questions available
Challenge Problems
Push your limits with advanced challenges
Create a Predicate that evaluates if an input string starts with 'A'.
💡 Hint: Think about string methods that act on the starting character.
Implement a Function that takes a list of integers and returns a list of their squares.
💡 Hint: Use stream operations to transform the list.
Get performance evaluation
Reference links
Supplementary resources to enhance your learning experience.