Answers for "how to append new line in stringbuilder"

3

stringbuilder append new line

StringBuilder r = new StringBuilder();

//It should be
r.append("n");

//But I recommend you to do as below, 
//beacuse it is system independent
r.append(System.getProperty("line.separator"));
Posted by: Guest on April-17-2020

Code answers related to "how to append new line in stringbuilder"

Browse Popular Code Answers by Language