java writing to a text file

后端 未结 6 1030
梦毁少年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 22:03

    Depending on what text editor you are opening the file with and what operating system you are using you might have to use "\r\n" instead of just "\n".

    Give it a try.

提交回复
热议问题