Respected Friend,
Herbert Schildt in his book "The Complete Reference
Java 2" explined the difference as follows :
"StringBuffer is a peer class of String that provides much more functionality of strings.As you know String represents fixed length,immutable characters sequences.In contrast,StringBuffer represents growable and writeable characters sequences.StringBuffer may have characters and sub strings inserted in the middle or appended to the end.StringBuffer will automatically grow to make room for such additions and often have more characters pre allocated than are actually needed,to allow room for growth.Java uses both classes heavily,but many programmers deal only with String and let Java manipulate StringBuffers behind the scenes by using the overloaded + operator".
Taqi Raza
[email protected]