title: How to replace "\\n" character to "\n" in a String?
body: <p>I have a string as follows,</p>
  
  <pre><code>String test = "abc\\ndef";
  </code></pre>
  
  <p>I want replace "\\n" characters to "\n" character. I tried as follows but it doesnt work as expected.</p>
  
  <pre><code>test.replace("\\\\n","\\n")
  </code></pre>
  
  <p>What am I doing wrong here? Finally test variable should be "abc\ndef" please note that \n is not for new line, it is plane characters.</p>
  
  <p>Note: this is not a duplicate of <a href="https://stackoverflow.com/questions/6010559/how-to-replace-n-by-n-in-java"> How to replace \\n by \n in Java</a> , it generates a new line character, but here I want characters "\n" not new line. <strong>So please reconsider before down voting</strong>.</p>