Writing newline to file adds an unwanted space
In Java, i am creating a text File for a batch file to upload in other system.
Wh开发者_如何学Goen i am writing into that file at the end of line i am using \n
to start the newline. While starting a new line its adding space into the file at the end of line.
How to overcome this issue?
You aren't showing your code or describing the space. Possibly a CR character before the LF, depending upon what you are doing, platform and configuration.
Starting from the second line, print the newline character before each line and not after it.
精彩评论