I have a StringBuilder object,
StringBuilder result = new StringBuilder(); result.append(someChar);
Now I want to append a newline characte
Escape should be done with \, not /.
\
/
So r.append('\n'); or r.append("\n"); will work (StringBuilder has overloaded methods for char and String type).
r.append('\n');
r.append("\n");
StringBuilder
char
String