How to append a newline to StringBuilder

I have a StringBuilder object,

StringBuilder result = new StringBuilder();
result.append(someChar);

Now I want to append a newline character to the StringBuilder. How can I do it?

result.append("/n"); 

Does not work. So, I was thinking about writing a newline using Unicode. Will this help? If so, how can I add one?

8 Answers
8

Leave a Comment