Java Streams and Lambda Expressions

Evaluate your ability to use modern Java functional features.

1. Which of the following is a terminal stream operation?
2. Select all functional interfaces from the following:
3. A lambda expression can be used wherever a functional interface is expected.
4. What is the return type of the Stream.map() method? (Use generic notation)
5. Which lambda correctly represents a Consumer<Integer> that prints the integer?
6. Which are intermediate stream operations?
7. Java Streams modify the original collection they are created from.
8. What method call converts a Stream<String> to a List<String> using Collectors?
9. What functional interface does Stream.filter() accept as an argument?
10. Which can be target types for a lambda expression?
11. A lambda can access and modify non-final local variables from the enclosing scope.
12. Name the functional interface with a single abstract method 'apply' that takes one argument and returns a result.
13. What is the result of Stream.of(2, 4, 6, 8).count()?
14. Select stateful intermediate stream operations:
15. Stream.forEach() returns a new Stream for further processing.
Answered 0 of 0 — 0 correct