java writing to a text file

后端 未结 6 1032
梦毁少年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:59

    Considering you have an empty catch block, it could be that you're getting an exception and hiding it. Remove the catch block and add throw IOException to your method definition so if you're getting an exception you can see it.

提交回复
热议问题