I need to write a txt file in Java with no carriage return charcter at the end of each line. Already I am using PrintWriter. But the output is as follow: enter image description here
I need it to be like the following picture. enter image description here
How can I do that?