← All topics
Quiz: Java 8 Lambdas and Streams: questions with answers
10 questions, each with the answer and a short explanation.
Take the timed quiz + get a certificate →- Q1. What does this print? (code)
- Q2. Which functional interface returns a boolean?
- Q3. When does a stream pipeline actually run?
- Q4. What does this print? (code)
- Q5. Which is the method reference for s - s.length()?
- Q6. What does this print? (code)
- Q7. What does this print? (code)
- Q8. Which functional interface takes a value and returns nothing?
- Q9. What does this print? (code)
- Q10. After List<Integer doubled = nums.stream().map(n - n 2).toList();, what is in nums?