R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which of these can be used to create an infinite stream?

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

Explanation by: Ram Sharma
`Stream.generate()` can be used to create an infinite stream.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.