Stream Operations Overview QuizJ8 Home « Stream Operations Overview Quiz

Streams Quiz 3

The quiz below tests your knowledge of the material learnt in Streams - Lesson 3 - Stream Operations Overview.

Question 1 : All intermediate streams are stateful?
- Intermediate streams are NOT all stateful.
Question 2 : Which of the following stream operations is terminal?
- The <code>reduce()</code> method is a terminal stream operation.
Question 3 : The filter() intermediate operation uses the Predicate<T> functional interface?
- The <code>filter()</code> intermediate operation DOES use the <code>Predicate</code> functional interface.
Question 4 : Which of the following stream operations is stateful-bounded?
- The <code>limit()</code> stream operations is stateful-bounded.
Question 5 : Which of the following stream operations is intermediate?
- The <code>peek()</code> method is an intermediate stream operation.
Question 6 : The forEach() terminal operation returns a long?
- The <code>forEach()</code> terminal operation returns <code>void</code>.
Question 7 : Which of the following stream operations is stateful-unbounded?
- The <code>sorted()</code> stream operations is stateful-unbounded.
Question 8 : Can we use a terminal stream operation to produce an array?
- We can use the <code>toArray()</code> terminal stream operation to produce an array.
Question 9 : Which of the following stream operations is stateless?
- The <code>filter()</code> stream operation is stateless.
Quiz Progress Bar Please select an answer


What's Next?

In the next quiz we test your knowledge of creating streams from arrays.