Quiz: Functional Programming in Java
Validate your understanding of Java's functional programming features, including lambda expressions, functional interfaces, variable capture, the Stream API, and the Optional class.
We'll cover the following...
We'll cover the following...
Technical Quiz
1.
In the context of the code below, why does the assignment fail?
Runnable r = () -> 5;
A.
Lambda expressions are not allowed to return values.
B.
The Runnable interface is not a functional interface.
C.
The lambda syntax is missing required curly braces.
D.
The lambda returns an int, but Runnable expects void.
1 / 10
...