R

Ram Sharma • 3.40K Points
Extraordinary

Q. What happens when you apply `limit(0)` on a stream?

  • (A) All elements are returned
  • (B) Stream is unchanged
  • (C) An empty stream is returned
  • (D) Throws IllegalArgumentException
  • Correct Answer - Option(C)
  • Views: 3
  • Filed under category Java
  • Hashtags:

Explanation by: Ram Sharma
`limit(0)` results in a stream with zero elements.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.