public void String(StringBuffer buffer){
  String result=buffer.toString();
  this.value=result.value;
  this.count=result.count;
  this.offset=result.offset;
}

public void String ( StringBuffer buffer ) { String result = buffer . toString ( ) ; this . value = result . value ; this . count = result . count ; this . offset = result . offset ; }
allocates a new string that contains the sequence of characters currently contained in the string buffer argument . the contents of the string buffer are copied ; subsequent modification of the string buffer does not affect the newly created string .
