R

Ram Sharma • 3.40K Points
Extraordinary

Q. What is a terminal operation in the Java Stream API?

  • (A) An operation that produces another stream
  • (B) An operation that modifies the stream
  • (C) An operation that consumes the stream and produces a result
  • (D) An operation that filters the stream
  • Correct Answer - Option(C)
  • Views: 16
  • Filed under category Java
  • Hashtags:

Explanation by: Ram Sharma
Terminal operations like `collect()` or `count()` produce a result and consume the stream.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.