A Java Program to show an example of creating a String object from a StringBuffer Object.
publicclass JAVA_062 { publicstaticvoid 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); } }