java writing to a text file

后端 未结 6 1042
梦毁少年i
梦毁少年i 2020-12-17 21:07

I would like the following to be printed

test1

test2

test3

test4

But I can\'t seem to get the text to the next line.

Plea

6条回答
  •  星月不相逢
    2020-12-17 21:56

    If you want to generate text, it's probably easier to create a PrintWriter on top of that BufferedWriter, and use the methods in PrintWriter (like println) to do the writing.

提交回复
热议问题