write newline into a file

后端 未结 9 1809
慢半拍i
慢半拍i 2020-12-05 05:28

considering the following function

private static void GetText(String nodeValue) throws IOException {

   if(!file3.exists()) {
       file3.createNewFile();         


        
9条回答
  •  生来不讨喜
    2020-12-05 06:03

    You could print through a PrintStream.

    PrintStream ps = new PrintStream(fop);
    ps.println(nodeValue);
    ps.close();
    

提交回复
热议问题