A

Admin • 828.03K Points
Coach

Q. Which method limits the number of elements in the stream?

  • (A) cap()
  • (B) restrict()
  • (C) limit()
  • (D) slice()

Explanation by: Admin
limit(n) returns a stream with at most n elements.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.