we all are know that String
is immutable and StringBuffer is not(mutable).But why String has replace() method?It causes String can be modified by some means.However replace is there for StringBuffer-it is OK!What is actual meaning of immutable?
So i need some explanation about it.
Can anyone explain?please.
Thanks in advance.