Java Blog

 
 
 
 public class JAVA_062
 {

    public static void main(String[] args)
    {
       StringBuffer SB=new StringBuffer(\"Many hands make light work\");

       System.out.println(\"StringBuffer : \" + SB);

       String Str=SB.toString( );

       System.out.println(\"String : \" + Str);
    }
 }

 
 
Didn't find what you were looking for? Find more on Program to show an example of creating a String object from a StringBuffer Object