StringBuffer添加换行

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();







你可能感兴趣的:(StringBuffer添加换行)