Looks like you got an escape character
\
Is an escape character, you need to escape it too in this scenario. Otherwise, you'd get an unterminated string. \"
means the actual character "
rather than the start or an end of a string.
If you want the actual character \
you need to escape it too: \\
String[] man = new String[]{
"| |",
"| o",
"| |",
"| /|\\", \\<- note the extra \
"| |",
"| / \\" \\<- note the extra \ here too
};
The official Java Tutorial
See the section on escape sequences in the official java tutorial:
A character preceded by a backslash (\) is an escape sequence and has special meaning to the compiler. The following table shows the Java escape sequences (me: table in link)
The language specification
This is of course in line with the language specification:
StringLiteral:
"StringCharacters"
StringCharacters:
StringCharacter
| StringCharacters StringCharacter
StringCharacter:
InputCharacter but not " or \
| EscapeSequence
EscapeSequence:
\ b
\ t
\ n
\ f
\ r
\ "
\ '
\ \ < - **THIS IS THE ONE YOU HAD**
OctalEscape /* \u0000 to \u00ff: from octal value */
(related question)
A broader view
Wikipedia has an interesting article on escape characters too:
In computing and telecommunication, an escape character is a character which invokes an alternative interpretation on subsequent characters in a character sequence. An escape character is a particular case of metacharacters. Generally, the judgement of whether something is an escape character or not depends on context.
Noting:
C, C++, Java, and Ruby all allow exactly the same two backslash escape styles.
Here is another related question here on SO about escaping strings.