📜  java 文件编写器不工作 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:35.399000             🧑  作者: Mango

代码示例1
You must close the FileWriter, otherwise it won't 
flush the current buffer. You can call the flush method directly..

    fileWriter.flush()
    fileWriter.close()
  
You don't need to use the flush method if you are closing the file. 
The flush can be used for example if your program runs for a while 
and outputs something in a file and you want to check it