Using ________, we can perform cleanup operations when the stream is closed.

  • catch
  • close
  • finally
  • try
In Java's Stream API, the close() method is used to perform cleanup operations when the stream is closed. This can be helpful when you need to release external resources or perform any necessary cleanup before the stream is no longer in use.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *