可変ファイルリストがあります。
filelist = "Example 1\n Example 2\n"
私が得るとき私はSystem.out.println(filename)
得る:
"Example 1
Example 2"
しかし、txtファイルに書き込むと、次のようになります。
"Example 1 Example 2"
\ nの改行でこれらを開始するにはどうすればよいですか?
try {
TextFile = new Formatter("C:\\Text.txt");
} catch (Exception e) {
e.printStackTrace();
} finally {
TextFile.format("%s", filename);
TextFile.close();
}