Java: how to write formatted output to plain text file

前端 未结 6 1714
粉色の甜心
粉色の甜心 2021-01-18 18:24

I am developing a small java application. At some point i am writing some data in a plain text file. Using the following code:

Writer Candidateoutput = null;         


        
6条回答
  •  余生分开走
    2021-01-18 19:14

    Well Windows expects a newline and a carriage return char to indicate a new line. So you'd want to do \r\n to make it work.

提交回复
热议问题