STRING AND STRING BUFFER
String class is a immutable class . Immutable classes are those classes in which if we create object of that class and after that alter the content of that object then every time a new object is created that store the altered content
String buffer class is mutable class . Mutable classes are those classes in which if we create object of that class and after that alter the content of that object that changes will occur in same object . No new object is created .
EXAMPLE :
String s = new String("Hello");
s=s+"World";
Understand that , a string s is created in line 1 in which initially we put "Hello" in string s . And in statement second we have concatenated string s . And add further "World " to this .
As this is a string class and...