Java: how to write formatted output to plain text file

前端 未结 6 1750
粉色の甜心
粉色の甜心 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:03

    Window's Notepad needs \r\n to display a new-line correctly. Only \n is ignored by Notepad.

提交回复
热议问题