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 is a lambda expression?
Think of it as a block of code you can pass around.
Why should one avoid complex logic in lambdas?
Consider how this impacts understanding the code at a glance.
What is a key benefit of using built-in functional interfaces in Java?
Consider their role in standardizing code.
True or False: We should implement complex business logic within lambdas.
Reflect on the purpose of using lambdas.
Given an existing lambda expression that checks if a number is even and calculates its square, refactor it to separate the checking logic from the squaring logic. Rewrite the code to follow best practices.
Look for opportunities to define functions that encapsulate logic.
Convert a lambda expression that prints out contents of a list to use method reference syntax. Original: list.forEach(item -> System.out.println(item));.
Identify the action being used in the lambda.
5 more questions in this section. Enroll free to practise them all.
Enroll free