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.
Loading...
Related Quiz
- If a and b are boolean expressions, then a & b is true only if ______.
- Envision a scenario where you need to design a chat server for thousands of concurrent connections. How would you design the server and what Java networking APIs would you use?
- Lambda expressions are used primarily to define the implementation of ________ interfaces.
- What is the major drawback of Linear Search compared to other searching algorithms?
- Which of the following character stream classes should be used to read characters, arrays, and lines efficiently?