Redundant escape character in Pattern
<p>I am trying out the following code and it's printing false.
I was expected that this would print true.
In addition , the Pattern.Compile() statemenet , gives a warning 'redundant escape character'.
Can someone please help me as to why this is not returning true and why do I see a warning.</p>

<pre><code>public static void main(String[] args) {
    String s = "\\n";
    System.out.println(s);

    Pattern p = Pattern.compile("\\\n");
    Matcher mm = p.matcher(s);
    System.out.println(mm.matches());
}
</code></pre>