Monday, March 9, 2015

String Buffer to String in java



String Buffer toString

public class JavaStringBufferToStringExample
{
public static void main(String args[])
{
StringBuffer sbf = new StringBuffer("Hello World!");
String str = sbf.toString();
System.out.println("StringBuffer to String: " + str);
   }
}

No comments:

Post a Comment