posted 24 years ago
String is an immutable class, i.e. the objects of this class once intialized can't change their values. In other words, there is no append method in the String class, etc.
StringBuffer on the other hand, allows various ways of manipulating, removing and inserting characters, etc.
Use String when you are sure that the characters are fix (e.g., a web page fetched from the Internet). Use StringBuffer when you have to manipulate the individual characters.
------------------