Search the courses, subjects, tracks, games and features, or jump straight to a page.
5 cards from this section. Quick, good the night before a test.
What is a functional interface?
Think about interfaces and how many abstract methods they can have.
Write a simple lambda expression that returns the square of an integer.
Remember the syntax for a lambda expression!
What does immutability prevent in functional programming?
Think about how changing data affects functions.
True or False: Lambda expressions can only be used in the context of functional interfaces.
Recall the purpose of lambda expressions.
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.
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.
Use map for transforming and orElse for default values.
5 more questions in this section. Enroll free to practise them all.
Enroll free