Platform Independent New Line Character in Java

Unix, Windows/DOS, and Mac have somewhat different newline characters to indicate the end-of-line. Unix uses ‘\n’ (linefeed) as the line separator. Some Windows/DOS application programs allow ‘\n’ as the newline character, but many expect a pair of characters ‘\r\n’ (carriage return followed by line feed). For …