title: Returning a "Java" New Line in a String?
body: <p>This may be a simple question, but I was unable to find anything resembling the topic:</p>
  
  <p>I have a program that needs to be run in Linux, and Windows.  As you know, Windows new line character is <code>\r\n</code>, and in Linux/Unix it is <code>\n</code> (Mac is <code>\r</code>).</p>
  
  <p>When I need to print anything to a file or to the command line, I can use println() function to create a new line.  This works fine, but I need to return many new line characters as Strings so that I can for example use them more than once, modify them, etc. (I can also use find-replace to replace all my <code>\r\n</code> at the same time.)</p>
  
  <p>The windows character <code>\r\n</code> I am using currently prints <code>^M</code> in Linux.</p>
  
  <p>Is there a character, or method I can use to return new lines in Strings?</p>