Writing a string array to file using Java - separate lines

前端 未结 5 668
不知归路
不知归路 2020-12-12 07:06

I\'m writing a program that writes sets of observations in the form of a String array (from User input) to file. I am able to write an observation to a .txt file and then ad

5条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-12 07:28

    bw.write(s);
    bw.write(System.getProperty("line.separator"));
    bw.flush();
    

提交回复
热议问题