R

Ram Sharma • 3.40K Points
Extraordinary

Q. Which of these methods helps inspect elements without modifying the stream?

  • (A) inspect()
  • (B) peek()
  • (C) look()
  • (D) tap()
  • Correct Answer - Option(B)
  • Views: 19
  • Filed under category Java
  • Hashtags:

Explanation by: Ram Sharma
`peek()` is used for debugging or inspecting elements in the stream pipeline.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.