Hi all,
I am writing here after quite some time.
I am faced with a problem - what does String class actually do to make its objects immutable or in other words, how does StringBuilder(or StringBuffer) differ from String class in that their objects are mutable ?
I mean what code in String ( or StringBuffer, for that matter ) makes it behave the way it does behave ?
For example, lets assume that we only have String class in java that makes immutable objects and we don't have StringBuilder or StringBuffer for making mutable objects and we need that functionality. So how should I make my "MutableString" class so that when I make its objects they are mutable ??
I've been pondering over this for some time now.
Thanking in anticipation.
Regards,
Vaibhav