Difference between String and StringBuffer »



Q) what is the difference between String and StringBuffer?
A)
–>String class objects are Immutable.
–>StringBuffer objects are mutable.
Why String objects are Immutable:
Click this JVM to know the defination(other def)    takes less time to create a new String object than to Re allocate memory to the existing object and modify its contents it will take [...]