public class TestStringBuffer {
public static void main(String[] args) {
StringBuffer sb = new StringBuffer("hello\nworld");
// sb.append("\n");
// String another = "world";
System.out.println(sb.toString());
// System.out.println(another);
}
}
或者:
.jsp页面
StringBuffer sb = new StringBuffer();
sb.append("<br/>");
sb.toString();