When using PrintWriter, the method ________ can be used to flush the stream and check its error state.

  • checkError()
  • close()
  • flush()
  • write()
In PrintWriter, the method checkError() can be used to flush the stream and check its error state. This method is handy when you want to make sure that all data is written and no errors occurred.
Add your answer
Loading...

Leave a comment

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