Quantcast
Channel: Why this simple program leads to different carriage return/line feed file when executed in Java and AIX? - Stack Overflow
Browsing latest articles
Browse All 4 View Live

Answer by Zecc for Why this simple program leads to different carriage...

Like it's been said, you should switch from using println(String) to print(String) or printf(String, ...) Check out the documentation for println(String) (emphasis mine): Prints a String and then...

View Article



Answer by NPE for Why this simple program leads to different carriage...

Different operating systems use different newline conventions: On Windows, newlines are CR+LF; On Unix, newlines are LF. (If you're curious, there's more.). If you need the output files to be...

View Article

Answer by stivlo for Why this simple program leads to different carriage...

Use writer.print(str + "\n"); instead of writer.println(str);

View Article

Why this simple program leads to different carriage return/line feed file...

If I run this simple program on Windows 7 and then on AIX (Unix system) and compare the two generated files using a tool such as Winmerge or Compare It, it tells me that the Carriage Return and Line...

View Article
Browsing latest articles
Browse All 4 View Live




Latest Images