R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which operation can create an infinite stream?

  • (A) Stream.of()
  • (B) Stream.generate()
  • (C) Stream.empty()
  • (D) Stream.concat()
  • Correct Answer - Option(B)
  • Views: 7
  • Filed under category Java
  • Hashtags:

Explanation by: Ram Sharma
`Stream.generate()` creates an infinite stream from a `Supplier`.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.