1.7.1 - Example
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 functional interface?
💡 Hint: Think about interfaces and how many abstract methods they can have.
Write a simple lambda expression that returns the square of an integer.
💡 Hint: Remember the syntax for a lambda expression!
4 more questions available
Interactive Quizzes
Quick quizzes to reinforce your learning
What does immutability prevent in functional programming?
💡 Hint: Think about how changing data affects functions.
True or False: Lambda expressions can only be used in the context of functional interfaces.
💡 Hint: Recall the purpose of lambda expressions.
1 more question available
Challenge Problems
Push your limits with advanced challenges
Create a Java program that applies several Stream operations: filter a list of names to those starting with 'A' then capitalize them and collect the results into a new list.
💡 Hint: Use filter and map operations appropriately.
Design a method that takes an Optional string as input, returns its length if present, or returns 0 if absent.
💡 Hint: Use map for transforming and orElse for default values.
Get performance evaluation
Reference links
Supplementary resources to enhance your learning experience.