Java 7 now has a System.lineSeparator()
method.
More Related Contents:
- Split Java String by New Line
- What’s the strategy for handling CRLF (carriage return, line feed) with Git?
- What is the best way to find the user’s home directory in Java?
- How do I monitor the computer’s CPU, memory, and disk usage in Java?
- Is there a way to embed a browser in Java? [closed]
- How to remove line breaks from a file in Java?
- What’s up with Java’s “%n” in printf?
- What is the cross-platform way of obtaining the path to the local application data directory?
- How is Java platform-independent when it needs a JVM to run?
- How do I format a String in an email so Outlook will print the line breaks?
- Platform independent paths in Java
- PHP Echo Line Breaks
- How do I compile a .java with support for older versions of Java?
- What are the differences between char literals ‘\n’ and ‘\r’ in Java?
- Shutting down a computer
- Do line endings differ between Windows and Linux? [closed]
- Windows: how to get a list of all visible windows?
- Strings written to file do not preserve line breaks
- Problems with newline in Graphics2D.drawString
- How can I call .NET code from Java?
- How to write new line character to a file in Java
- Running SWT based, cross-platform jar properly on a Mac
- How to do system short cuts cross platform integration in Java?
- Java Regex – Using String’s replaceAll method to replace newlines
- How to atomically rename a file in Java, even if the dest file already exists?
- How do you keep the machine awake?
- How can I print a string adding newlines in Java?
- How to use the same C++ code for Android and iOS?
- Javadoc @author tag good practices
- struts2 file upload loosing parameters