如何在FileWriter中生成新行?似乎"\n"不起作用.
log = new FileWriter("c:\\" + s.getInetAddress().getHostAddress() + ".txt", true);
log.append("\n" + Long.toString(fileTransferTime));
log.close();
Run Code Online (Sandbox Code Playgroud)
上面代码的文件输出只是一长串数字而没有新行.
java ×1