Friday, March 6, 2015

Java String Buffer append in a pgm



Java String Buffer append new line

public class JavaStringBufferAppendNewLineExample
{      
public static void main(String args[])
{
StringBuffer sbf = new StringBuffer("This is the first line.");
sbf.append(System.getProperty("line.separator"));
sbf.append("This is second line.");
System.out.println(sbf);
    }
}

No comments:

Post a Comment