R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which method is used to build a stream from a Supplier?

  • (A) Stream.of()
  • (B) Stream.builder()
  • (C) Stream.generate()
  • (D) Stream.supply()
  • Correct Answer - Option(C)
  • Views: 9
  • Filed under category Java
  • Hashtags:

Explanation by: Ram Sharma
`Stream.generate(Supplier)` returns an infinite stream of values produced by the Supplier.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.