still i am not aware, how string acheive its immutability. because, both String & StringBuffer are final classess. but, String is immutable; and StringBuffer is mutable.
pls, let me know if anyone have clear idea about this...
String class has no method allowing you to modify its content, while StringBuffer has. The String class just does not present such methods, and does not allow us to extend it. Therefore, it's immutable.