Oracle Java OCP Streams and Lambda Expressions Quiz

Reviewed by Editorial Team
The ProProfs editorial team is comprised of experienced subject matter experts. They've collectively created over 10,000 quizzes and lessons, serving over 100 million users. Our team includes in-house content moderators and subject matter experts, as well as a global network of rigorously trained contributors. All adhere to our comprehensive editorial guidelines, ensuring the delivery of high-quality content.
Learn about Our Editorial Process
| By Thames
T
Thames
Community Contributor
Quizzes Created: 11220 | Total Attempts: 140,660
| Attempts: 14 | Questions: 20 | Updated: Aug 15, 2026
Please wait...
Question 1 / 21
🏆 Rank #--
0 %
0/100
Score 0/100

1. Which of the following correctly creates a stream from an array?

Submit
Please wait...
About This Quiz
Oracle Java OCP Streams and Lambda Expressions Quiz - Quiz

Master Java streams and lambda expressions, core features of modern Java development. This quiz evaluates your understanding of functional programming, stream operations, method references, and lambda syntax. Essential for OCP certification and professional Java development.

2.

What first name or nickname would you like us to use?

You may optionally provide this to label your report, leaderboard, or certificate.

2. True or False: Streams are lazy, meaning intermediate operations are executed only when a terminal operation is called.

Submit

3. What does the skip(n) operation do?

Submit

4. True or False: The findFirst() operation is a terminal operation.

Submit

5. True or False: The reduce() method is a terminal operation.

Submit

6. What does the peek() operation do in a stream?

Submit

7. What is the output of the following code? List nums = Arrays.asList(1,2,3); nums.stream().map(x -> x*2).forEach(System.out::println);

Submit

8. What does the flatMap() operation do in a stream?

Submit

9. Which stream operation is terminal and collects stream elements into a List?

Submit

10. Which functional interface accepts a single parameter and returns a boolean?

Submit

11. True or False: A stream can be reused after calling a terminal operation.

Submit

12. Which of the following is a valid method reference syntax?

Submit

13. Which functional interface is used as the target type for a lambda expression with no parameters and no return value?

Submit

14. What is the result of stream().limit(3) on a stream of 10 elements?

Submit

15. Which stream operation returns a boolean indicating if all elements match a predicate?

Submit

16. True or False: Lambda expressions can access non-final local variables.

Submit

17. What does the sorted() operation do without parameters?

Submit

18. Which method creates a stream of primitive integers from start to end?

Submit

19. Which functional interface represents a function that takes one parameter and returns a value?

Submit

20. What is the correct syntax for a lambda expression that takes two integers and returns their sum?

Submit
×
Saved
Thank you for your feedback!
View My Results
Cancel
  • All
    All (20)
  • Unanswered
    Unanswered ()
  • Answered
    Answered ()
Which of the following correctly creates a stream from an array?
True or False: Streams are lazy, meaning intermediate operations are...
What does the skip(n) operation do?
True or False: The findFirst() operation is a terminal operation.
True or False: The reduce() method is a terminal operation.
What does the peek() operation do in a stream?
What is the output of the following code? List nums =...
What does the flatMap() operation do in a stream?
Which stream operation is terminal and collects stream elements into a...
Which functional interface accepts a single parameter and returns a...
True or False: A stream can be reused after calling a terminal...
Which of the following is a valid method reference syntax?
Which functional interface is used as the target type for a lambda...
What is the result of stream().limit(3) on a stream of 10 elements?
Which stream operation returns a boolean indicating if all elements...
True or False: Lambda expressions can access non-final local...
What does the sorted() operation do without parameters?
Which method creates a stream of primitive integers from start to end?
Which functional interface represents a function that takes one...
What is the correct syntax for a lambda expression that takes two...
play-Mute sad happy unanswered_answer up-hover down-hover success oval cancel Check box square blue
Alert!