In java, the \
char is an escape character, meaning that the following char is some sort of control character (such as \n \t or \r).
To print literals in Java escape it with an additional \
char
Such as:
String text = "\\n is used for a new line";
System.out.println(text);
Will print:
\n is used for a new line