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: 8865 | Total Attempts: 106,055
| 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. Which functional interface represents a function that takes one parameter and returns a value?

Submit

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

Submit

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

Submit

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

Submit

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

Submit

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

Submit

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

Submit

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

Submit

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

Submit

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

Submit

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

Submit

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

Submit

15. 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

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

Submit

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

Submit

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

Submit

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

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...
Which functional interface represents a function that takes one...
What does the skip(n) operation do?
True or False: The findFirst() operation is a terminal operation.
Which method creates a stream of primitive integers from start to end?
What does the sorted() operation do without parameters?
True or False: Lambda expressions can access non-final local...
Which stream operation returns a boolean indicating if all elements...
What is the result of stream().limit(3) on a stream of 10 elements?
Which functional interface is used as the target type for a lambda...
True or False: The reduce() method is a terminal operation.
What does the peek() operation do in a stream?
Which functional interface accepts a single parameter and returns a...
What is the output of the following code? List nums =...
True or False: A stream can be reused after calling a terminal...
Which of the following is a valid method reference syntax?
What does the flatMap() operation do in a stream?
Which stream operation is terminal and collects stream elements into a...
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!